1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.4.2_04) on Tue Apr 06 19:57:28 PDT 2004 -->
<TITLE>
Coordinator
</TITLE>
<META NAME="keywords" CONTENT="coordination.Coordinator class">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../stylesheet.css" TITLE="Style">
<SCRIPT type="text/javascript">
function windowTitle()
{
parent.document.title="Coordinator";
}
</SCRIPT>
</HEAD>
<BODY BGCOLOR="white" onload="windowTitle();">
<!-- ========= START OF TOP NAVBAR ======= -->
<A NAME="navbar_top"><!-- --></A>
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
PREV CLASS
<A HREF="../coordination/Method.html" title="class in coordination"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../index.html" target="_top"><B>FRAMES</B></A>
<A HREF="Coordinator.html" target="_top"><B>NO FRAMES</B></A>
<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY: NESTED | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_top"></A>
<!-- ========= END OF TOP NAVBAR ========= -->
<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
coordination</FONT>
<BR>
Aspect Coordinator</H2>
<PRE>
java.lang.Object
<IMG SRC="../resources/inherit.gif" ALT="extended by"><B>coordination.Coordinator</B>
</PRE>
<DL>
<DT><B>Direct Known Subclasses:</B> <DD><A HREF="../spacewar/GameSynchronization.html" title="class in spacewar">GameSynchronization</A>, <A HREF="../spacewar/RegistrySynchronization.html" title="class in spacewar">RegistrySynchronization</A></DD>
</DL>
<HR>
<DL>
<DT>public abstract class <B>Coordinator</B><DT>extends java.lang.Object</DL>
<P>
The Coordinator class provides the basic functionality for synchronizing
and coordinating different threads upon entering and exiting methods.
It can be used in two different ways:
1) by instantiating regular coordinator objects that are used by aspects; or
2) by extending it (sub-classing) with coordinator aspects.
<P>
Method invocations are the smallest units for defining critical sections
and pre-conditions. The use of coordinators, either regular objects or aspect
instances, should always end up by invoking guardedEntry(...) in a
before weave and guardedExit(...) in an after weave for all methods that
need coordination. guardedEntry and guardedExit are the methods that
actually manage the synchronization and coordination constraints given
by their parameters and by pre-existent exclusion markers.
<P>
The synchronization of threads for the execution of critical section
methods in an object is done by marking those methods as self- and/or
mutually-exclusive (addSelfex, addMutex).
Just by itself, addSelfex("M") does not enforce the self-exclusion
of method M - enforcement is done by invoking guardedEntry before
M is executed. Similarly, addMutex(new String[] {"M1", "M2"}) does
not enforce the mutual exclusion between methods M1 and M2.
<P>
A guardedEntry on a method that has been marked as self-exclusive
ensures that the method is executed in the invoked object by only one thread
at a time. A guardedEntry on a method that has been marked has mutually-
exclusive with other methods ensures that the execution of that method
by a thread in the invoked object temporarily blocks the execution by
other threads of the methods that are in the same mutex set.
<P>
The coordination of threads, i.e. their explicit suspension and
resumption, is done through the use of pre-conditions and coordination
actions that are passed as parameters to guardedEntry and guardedExit
with the form of anonymous classes.
<P>
<P>
<HR>
<P>
<!-- ======== NESTED CLASS SUMMARY ======== -->
<!-- ======== POINTCUT SUMMARY ======= -->
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="1"CELLSPACING="0"><TR><TD COLSPAN=2 BGCOLOR="#CCCCFF"><FONT SIZE="+2"><B>Pointcut Summary</B></FONT></TD></TR>
<TR><TD WIDTH="1%"><FONT SIZE=-1><TT>protected</TT></FONT></TD>
<TD><TT><A HREF="#synchronizationPoint()">synchronizationPoint()</A></TT><BR> </TR></TD>
</TABLE><P>
<!-- ======== ADVICE SUMMARY ======= -->
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="1"CELLSPACING="0"><TR><TD COLSPAN=2 BGCOLOR="#CCCCFF"><FONT SIZE="+2"><B>Advice Summary</B></FONT></TD></TR>
<TR><TD><A HREF="#before(): synchronizationPoint.."><TT><B>before(): synchronizationPoint..</B></TT></A><BR> <TABLE WIDTH="100%" BGCOLOR=#FFFFFF><TR><TD width="10%" bgcolor="#FFD8B0"><B><FONT COLOR=000000> Advises:</b></font></td><td><A HREF="Display1.html#paintObjects(Graphics)"><tt>spacewar.Display1.paintObjects</tt></A>, <A HREF="Display2.html#paintObjects(Graphics)"><tt>spacewar.Display2.paintObjects</tt></A>, <A HREF="Game.html#resetShips()"><tt>spacewar.Game.resetShips</tt></A>, <A HREF="Game.html#newPlayer(int)"><tt>spacewar.Game.newPlayer</tt></A>, <A HREF="Game.html#newRobot(int)"><tt>spacewar.Game.newRobot</tt></A>, <A HREF="Game.html#clockTick()"><tt>spacewar.Game.clockTick</tt></A>, <A HREF="Game.html#handleCollisions()"><tt>spacewar.Game.handleCollisions</tt></A>, <A HREF="Registry.html#dummy()"><tt>spacewar.Registry.dummy</tt></A>, <A HREF="Robot.html#run()"><tt>spacewar.Robot.run</tt></A>, <A HREF="../spacewar/SpaceObject.html"><tt>spacewar.SpaceObject</tt></A>, <A HREF="SpaceObject.html#die()"><tt>spacewar.SpaceObject.die</tt></A></B></FONT></TD></TR></TABLE>
</TR></TD>
</TD></TR><TD>
<TR><TD><A HREF="#after(): synchronizationPoint.."><TT><B>after(): synchronizationPoint..</B></TT></A><BR> <TABLE WIDTH="100%" BGCOLOR=#FFFFFF><TR><TD width="10%" bgcolor="#FFD8B0"><B><FONT COLOR=000000> Advises:</b></font></td><td><A HREF="Display1.html#paintObjects(Graphics)"><tt>spacewar.Display1.paintObjects</tt></A>, <A HREF="Display2.html#paintObjects(Graphics)"><tt>spacewar.Display2.paintObjects</tt></A>, <A HREF="Game.html#resetShips()"><tt>spacewar.Game.resetShips</tt></A>, <A HREF="Game.html#newPlayer(int)"><tt>spacewar.Game.newPlayer</tt></A>, <A HREF="Game.html#newRobot(int)"><tt>spacewar.Game.newRobot</tt></A>, <A HREF="Game.html#clockTick()"><tt>spacewar.Game.clockTick</tt></A>, <A HREF="Game.html#handleCollisions()"><tt>spacewar.Game.handleCollisions</tt></A>, <A HREF="Registry.html#dummy()"><tt>spacewar.Registry.dummy</tt></A>, <A HREF="Robot.html#run()"><tt>spacewar.Robot.run</tt></A>, <A HREF="../spacewar/SpaceObject.html"><tt>spacewar.SpaceObject</tt></A>, <A HREF="SpaceObject.html#die()"><tt>spacewar.SpaceObject.die</tt></A></B></FONT></TD></TR></TABLE>
</TR></TD>
</TD></TR><TD>
</TABLE><P>
<!-- =========== FIELD SUMMARY =========== -->
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<A NAME="constructor_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Constructor Summary</B></FONT></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../coordination/Coordinator.html#Coordinator()">Coordinator</A></B>()</CODE>
<BR>
</TD>
</TR>
</TABLE>
<!-- ========== METHOD SUMMARY =========== -->
<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Method Summary</B></FONT></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../coordination/Coordinator.html#addMutex(java.lang.String[])">addMutex</A></B>(java.lang.String[] methNames)</CODE>
<BR>
Takes an array of multi-part method names and marks those
methods as mutually exclusive.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../coordination/Coordinator.html#addSelfex(java.lang.String)">addSelfex</A></B>(java.lang.String methName)</CODE>
<BR>
Takes a multi-part method name (eg "BoundedBuffer.put")
and marks that method as self-exclusive.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../coordination/Coordinator.html#guardedEntry(java.lang.String)">guardedEntry</A></B>(java.lang.String methName)</CODE>
<BR>
This method is the guard for enforcing all synchronization and
coordination constraints of a given method, and it should be called
just before the method is executed.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../coordination/Coordinator.html#guardedEntry(java.lang.String, coordination.Condition)">guardedEntry</A></B>(java.lang.String methName,
<A HREF="../coordination/Condition.html" title="interface in coordination">Condition</A> condition)</CODE>
<BR>
Just like guardedEntry(String methName), but the given method is executed
only when the given condition is true.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../coordination/Coordinator.html#guardedEntry(java.lang.String, coordination.Condition, coordination.CoordinationAction)">guardedEntry</A></B>(java.lang.String methName,
<A HREF="../coordination/Condition.html" title="interface in coordination">Condition</A> condition,
<A HREF="../coordination/CoordinationAction.html" title="interface in coordination">CoordinationAction</A> action)</CODE>
<BR>
Just like guardedEntry(String methName), but the given method is executed
only when the given condition is true; the additional
coordination action that is executed before the given method is
executed.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../coordination/Coordinator.html#guardedEntry(java.lang.String, coordination.CoordinationAction)">guardedEntry</A></B>(java.lang.String methName,
<A HREF="../coordination/CoordinationAction.html" title="interface in coordination">CoordinationAction</A> action)</CODE>
<BR>
Just like guardedEntry(String methName), but with an additional
coordination action that is executed before the given method is
executed.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../coordination/Coordinator.html#guardedEntryWithTimeout(java.lang.String, coordination.Condition, coordination.CoordinationAction, long)">guardedEntryWithTimeout</A></B>(java.lang.String methName,
<A HREF="../coordination/Condition.html" title="interface in coordination">Condition</A> condition,
<A HREF="../coordination/CoordinationAction.html" title="interface in coordination">CoordinationAction</A> action,
long millis)</CODE>
<BR>
This method is similar to guardedEntry, but it takes
an additional parameter - the milliseconds after which any suspension
will abort with a timeout.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../coordination/Coordinator.html#guardedEntryWithTimeout(java.lang.String, coordination.Condition, long)">guardedEntryWithTimeout</A></B>(java.lang.String methName,
<A HREF="../coordination/Condition.html" title="interface in coordination">Condition</A> condition,
long millis)</CODE>
<BR>
This method is similar to guardedEntry, but it takes
an additional parameter - the milliseconds after which any suspension
will abort with a timeout.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../coordination/Coordinator.html#guardedEntryWithTimeout(java.lang.String, coordination.CoordinationAction, long)">guardedEntryWithTimeout</A></B>(java.lang.String methName,
<A HREF="../coordination/CoordinationAction.html" title="interface in coordination">CoordinationAction</A> action,
long millis)</CODE>
<BR>
This method is similar to guardedEntry, but it takes
an additional parameter - the milliseconds after which any suspension
will abort with a timeout.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../coordination/Coordinator.html#guardedEntryWithTimeout(java.lang.String, long)">guardedEntryWithTimeout</A></B>(java.lang.String methName,
long millis)</CODE>
<BR>
This method is similar to guardedEntry, but it takes
an additional parameter - the milliseconds after which any suspension
will abort with a timeout.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../coordination/Coordinator.html#guardedExit(java.lang.String)">guardedExit</A></B>(java.lang.String methName)</CODE>
<BR>
This method provides the means for updating all synchronization and
coordination state after the execution of a given method, and it should be
called after the method is executed.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../coordination/Coordinator.html#guardedExit(java.lang.String, coordination.CoordinationAction)">guardedExit</A></B>(java.lang.String methName,
<A HREF="../coordination/CoordinationAction.html" title="interface in coordination">CoordinationAction</A> action)</CODE>
<BR>
Just like guardedExit(String methName) but with an additional
coordination action that is executed.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../coordination/Coordinator.html#removeMutex(java.lang.String[])">removeMutex</A></B>(java.lang.String[] methNames)</CODE>
<BR>
Takes an array of multi-part method names that correspond
to an existing mutex set and remove the mutual exclusion constraint.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../coordination/Coordinator.html#removeSelfex(java.lang.String)">removeSelfex</A></B>(java.lang.String methName)</CODE>
<BR>
Takes a multi-part method name (e.g.</TD>
</TR>
</TABLE>
<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TD><B>Methods inherited from class java.lang.Object</B></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD>
</TR>
</TABLE>
<P>
<P>
<!-- ======== POINTCUT DETAIL SUMMARY ======= -->
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Pointcut Detail</B></FONT></TD>
</TR>
</TABLE><A NAME="synchronizationPoint()"><!-- --></A>
<H3>synchronizationPoint()</H3><P><P><P>
<!-- ======== ADVICE DETAIL SUMMARY ======= -->
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Advice Detail</B></FONT></TD>
</TR>
</TABLE><A NAME="before(): synchronizationPoint.."><!-- --></A>
<H3>before</H3><P><TT><B>before(): synchronizationPoint..</B></TT>
<P><P><TABLE WIDTH="100%" BGCOLOR=#FFFFFF><TR><TD width="10%" bgcolor="#FFD8B0"><B><FONT COLOR=000000> Advises:</b></font></td><td><A HREF="Display1.html#paintObjects(Graphics)"><tt>spacewar.Display1.paintObjects</tt></A>, <A HREF="Display2.html#paintObjects(Graphics)"><tt>spacewar.Display2.paintObjects</tt></A>, <A HREF="Game.html#resetShips()"><tt>spacewar.Game.resetShips</tt></A>, <A HREF="Game.html#newPlayer(int)"><tt>spacewar.Game.newPlayer</tt></A>, <A HREF="Game.html#newRobot(int)"><tt>spacewar.Game.newRobot</tt></A>, <A HREF="Game.html#clockTick()"><tt>spacewar.Game.clockTick</tt></A>, <A HREF="Game.html#handleCollisions()"><tt>spacewar.Game.handleCollisions</tt></A>, <A HREF="Registry.html#dummy()"><tt>spacewar.Registry.dummy</tt></A>, <A HREF="Robot.html#run()"><tt>spacewar.Robot.run</tt></A>, <A HREF="../spacewar/SpaceObject.html"><tt>spacewar.SpaceObject</tt></A>, <A HREF="SpaceObject.html#die()"><tt>spacewar.SpaceObject.die</tt></A></B></FONT></TD></TR></TABLE>
</TR></TD>
<P><HR>
<A NAME="after(): synchronizationPoint.."><!-- --></A>
<H3>after</H3><P><TT><B>after(): synchronizationPoint..</B></TT>
<P><P><TABLE WIDTH="100%" BGCOLOR=#FFFFFF><TR><TD width="10%" bgcolor="#FFD8B0"><B><FONT COLOR=000000> Advises:</b></font></td><td><A HREF="Display1.html#paintObjects(Graphics)"><tt>spacewar.Display1.paintObjects</tt></A>, <A HREF="Display2.html#paintObjects(Graphics)"><tt>spacewar.Display2.paintObjects</tt></A>, <A HREF="Game.html#resetShips()"><tt>spacewar.Game.resetShips</tt></A>, <A HREF="Game.html#newPlayer(int)"><tt>spacewar.Game.newPlayer</tt></A>, <A HREF="Game.html#newRobot(int)"><tt>spacewar.Game.newRobot</tt></A>, <A HREF="Game.html#clockTick()"><tt>spacewar.Game.clockTick</tt></A>, <A HREF="Game.html#handleCollisions()"><tt>spacewar.Game.handleCollisions</tt></A>, <A HREF="Registry.html#dummy()"><tt>spacewar.Registry.dummy</tt></A>, <A HREF="Robot.html#run()"><tt>spacewar.Robot.run</tt></A>, <A HREF="../spacewar/SpaceObject.html"><tt>spacewar.SpaceObject</tt></A>, <A HREF="SpaceObject.html#die()"><tt>spacewar.SpaceObject.die</tt></A></B></FONT></TD></TR></TABLE>
</TR></TD>
<P><!-- ============ FIELD DETAIL =========== -->
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<A NAME="constructor_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Constructor Detail</B></FONT></TD>
</TR>
</TABLE>
<A NAME="Coordinator()"><!-- --></A><H3>
Coordinator</H3>
<PRE>
public <B>Coordinator</B>()</PRE>
<DL>
<DD>
<P>
</DL>
<!-- ============ METHOD DETAIL ========== -->
<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Method Detail</B></FONT></TD>
</TR>
</TABLE>
<A NAME="addSelfex(java.lang.String)"><!-- --></A><H3>
addSelfex</H3>
<PRE>
public void <B>addSelfex</B>(java.lang.String methName)</PRE>
<DL>
<DD>
Takes a multi-part method name (eg "BoundedBuffer.put")
and marks that method as self-exclusive.
No checks are made with respect to the existence of the method
whose name is given.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="removeSelfex(java.lang.String)"><!-- --></A><H3>
removeSelfex</H3>
<PRE>
public void <B>removeSelfex</B>(java.lang.String methName)</PRE>
<DL>
<DD>
Takes a multi-part method name (e.g. "BoundedBuffer.put")
and removes that method from the list of self-exclusive methods.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="addMutex(java.lang.String[])"><!-- --></A><H3>
addMutex</H3>
<PRE>
public void <B>addMutex</B>(java.lang.String[] methNames)</PRE>
<DL>
<DD>
Takes an array of multi-part method names and marks those
methods as mutually exclusive.
No checks are made with respect to the existence of the methods
whose names are given.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="removeMutex(java.lang.String[])"><!-- --></A><H3>
removeMutex</H3>
<PRE>
public void <B>removeMutex</B>(java.lang.String[] methNames)</PRE>
<DL>
<DD>
Takes an array of multi-part method names that correspond
to an existing mutex set and remove the mutual exclusion constraint.
If the given mutex set does not exist, removeMutex does nothing.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="guardedEntry(java.lang.String)"><!-- --></A><H3>
guardedEntry</H3>
<PRE>
public void <B>guardedEntry</B>(java.lang.String methName)</PRE>
<DL>
<DD>
This method is the guard for enforcing all synchronization and
coordination constraints of a given method, and it should be called
just before the method is executed.
In this form, only the method name is given. The only constraints
checked are the exclusion constraints.
If the method was previousely marked as selfex (through addSelfex),
guardedEntry ensures that the method is executed only when no other
thread is executing it.
If the method was previousely marked as being in one or more mutex
sets, guardedEntry ensures that the method is executed only when no other
thread is executing any of the methods with which the give method is
mutexed.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="guardedEntry(java.lang.String, coordination.Condition)"><!-- --></A><H3>
guardedEntry</H3>
<PRE>
public void <B>guardedEntry</B>(java.lang.String methName,
<A HREF="../coordination/Condition.html" title="interface in coordination">Condition</A> condition)</PRE>
<DL>
<DD>
Just like guardedEntry(String methName), but the given method is executed
only when the given condition is true.
guardedEntry is the guard for enforcing all synchronization and
coordination constraints of a given method, and it should be called
just before the method is executed.
In this form, the method name is given along with a condition.
The constraints checked are the exclusion constraints and whether
the given condition is true.
If the method was previousely marked as selfex (through addSelfex),
guardedEntry ensures that the method is executed only when no other
thread is executing it.
If the method was previousely marked as being in one or more mutex
sets, guardedEntry ensures that the method is executed only when no other
thread is executing any of the methods with which the give method is
mutexed.
If the condition is false, guardedEntry suspends the current thread.
That thread remains suspended until the condition becomes true, in
which case all constraints are rechecked before the method is executed.
When all exclusion constraints are checked and the given condition is
true, the given method is executed.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="guardedEntry(java.lang.String, coordination.CoordinationAction)"><!-- --></A><H3>
guardedEntry</H3>
<PRE>
public void <B>guardedEntry</B>(java.lang.String methName,
<A HREF="../coordination/CoordinationAction.html" title="interface in coordination">CoordinationAction</A> action)</PRE>
<DL>
<DD>
Just like guardedEntry(String methName), but with an additional
coordination action that is executed before the given method is
executed.
guardedEntry is the guard for enforcing all synchronization and
coordination constraints of a given method, and it should be called
just before the method is executed.
In this form, the method name is given along with a coordination action.
The only constraints checked are the exclusion constraints.
If the method was previousely marked as selfex (through addSelfex),
guardedEntry ensures that the method is executed only when no other
thread is executing it.
If the method was previousely marked as being in one or more mutex
sets, guardedEntry ensures that the method is executed only when no other
thread is executing any of the methods with which the give method is
mutexed.
The given coordination action is executed just before the given method
is executed.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="guardedEntry(java.lang.String, coordination.Condition, coordination.CoordinationAction)"><!-- --></A><H3>
guardedEntry</H3>
<PRE>
public void <B>guardedEntry</B>(java.lang.String methName,
<A HREF="../coordination/Condition.html" title="interface in coordination">Condition</A> condition,
<A HREF="../coordination/CoordinationAction.html" title="interface in coordination">CoordinationAction</A> action)</PRE>
<DL>
<DD>
Just like guardedEntry(String methName), but the given method is executed
only when the given condition is true; the additional
coordination action that is executed before the given method is
executed.
guardedEntry is the guard for enforcing all synchronization and
coordination constraints of a given method, and it should be called
just before the method is executed.
In this form, the method name is given along with a condition and
a coordination action.
The constraints checked are the exclusion constraints and whether the
given condition is true.
If the method was previousely marked as selfex (through addSelfex),
guardedEntry ensures that the method is executed only when no other
thread is executing it.
If the method was previousely marked as being in one or more mutex
sets, guardedEntry ensures that the method is executed only when no other
thread is executing any of the methods with which the give method is
mutexed.
If the condition is false, guardedEntry suspends the current thread.
That thread remains suspended until the condition becomes true, in
which case all constraints are rechecked before the method is executed.
When all exclusion constraints are checked and the given condition is
true, the given method is executed.
The given coordination action is executed just before the given method
is executed.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="guardedEntryWithTimeout(java.lang.String, long)"><!-- --></A><H3>
guardedEntryWithTimeout</H3>
<PRE>
public void <B>guardedEntryWithTimeout</B>(java.lang.String methName,
long millis)
throws <A HREF="../coordination/TimeoutException.html" title="class in coordination">TimeoutException</A></PRE>
<DL>
<DD>
This method is similar to guardedEntry, but it takes
an additional parameter - the milliseconds after which any suspension
will abort with a timeout.
<P>
<DD><DL>
<DT><B>Throws:</B>
<DD><CODE><A HREF="../coordination/TimeoutException.html" title="class in coordination">TimeoutException</A></CODE></DL>
</DD>
</DL>
<HR>
<A NAME="guardedEntryWithTimeout(java.lang.String, coordination.Condition, long)"><!-- --></A><H3>
guardedEntryWithTimeout</H3>
<PRE>
public void <B>guardedEntryWithTimeout</B>(java.lang.String methName,
<A HREF="../coordination/Condition.html" title="interface in coordination">Condition</A> condition,
long millis)
throws <A HREF="../coordination/TimeoutException.html" title="class in coordination">TimeoutException</A></PRE>
<DL>
<DD>
This method is similar to guardedEntry, but it takes
an additional parameter - the milliseconds after which any suspension
will abort with a timeout.
<P>
<DD><DL>
<DT><B>Throws:</B>
<DD><CODE><A HREF="../coordination/TimeoutException.html" title="class in coordination">TimeoutException</A></CODE></DL>
</DD>
</DL>
<HR>
<A NAME="guardedEntryWithTimeout(java.lang.String, coordination.CoordinationAction, long)"><!-- --></A><H3>
guardedEntryWithTimeout</H3>
<PRE>
public void <B>guardedEntryWithTimeout</B>(java.lang.String methName,
<A HREF="../coordination/CoordinationAction.html" title="interface in coordination">CoordinationAction</A> action,
long millis)
throws <A HREF="../coordination/TimeoutException.html" title="class in coordination">TimeoutException</A></PRE>
<DL>
<DD>
This method is similar to guardedEntry, but it takes
an additional parameter - the milliseconds after which any suspension
will abort with a timeout.
<P>
<DD><DL>
<DT><B>Throws:</B>
<DD><CODE><A HREF="../coordination/TimeoutException.html" title="class in coordination">TimeoutException</A></CODE></DL>
</DD>
</DL>
<HR>
<A NAME="guardedEntryWithTimeout(java.lang.String, coordination.Condition, coordination.CoordinationAction, long)"><!-- --></A><H3>
guardedEntryWithTimeout</H3>
<PRE>
public void <B>guardedEntryWithTimeout</B>(java.lang.String methName,
<A HREF="../coordination/Condition.html" title="interface in coordination">Condition</A> condition,
<A HREF="../coordination/CoordinationAction.html" title="interface in coordination">CoordinationAction</A> action,
long millis)
throws <A HREF="../coordination/TimeoutException.html" title="class in coordination">TimeoutException</A></PRE>
<DL>
<DD>
This method is similar to guardedEntry, but it takes
an additional parameter - the milliseconds after which any suspension
will abort with a timeout.
<P>
<DD><DL>
<DT><B>Throws:</B>
<DD><CODE><A HREF="../coordination/TimeoutException.html" title="class in coordination">TimeoutException</A></CODE></DL>
</DD>
</DL>
<HR>
<A NAME="guardedExit(java.lang.String)"><!-- --></A><H3>
guardedExit</H3>
<PRE>
public void <B>guardedExit</B>(java.lang.String methName)</PRE>
<DL>
<DD>
This method provides the means for updating all synchronization and
coordination state after the execution of a given method, and it should be
called after the method is executed.
In this form, only the method name is given.
The synchronization state for self- and mutual-exclusion is
automatically upadted.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="guardedExit(java.lang.String, coordination.CoordinationAction)"><!-- --></A><H3>
guardedExit</H3>
<PRE>
public void <B>guardedExit</B>(java.lang.String methName,
<A HREF="../coordination/CoordinationAction.html" title="interface in coordination">CoordinationAction</A> action)</PRE>
<DL>
<DD>
Just like guardedExit(String methName) but with an additional
coordination action that is executed.
guardedExit provides the means for updating all synchronization and
coordination state after the execution of a given method, and it should be
called after the method is executed.
In this form, the method name is given along with a coordination action.
The synchronization state for self- and mutual-exclusion is
automatically upadted.
The given coordination action is executed.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<A NAME="navbar_bottom"><!-- --></A>
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
PREV CLASS
<A HREF="../coordination/Method.html" title="class in coordination"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../index.html" target="_top"><B>FRAMES</B></A>
<A HREF="Coordinator.html" target="_top"><B>NO FRAMES</B></A>
<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY: NESTED | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<HR>
</BODY>
</HTML>
|