|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.apache.jdo.tck.util.RogueBarrier
Allows a set of threads to wait for all to reach a common barrier point.
The RogueBarrier uses a rigorous breakage model:
No thread can leave a barrier point prematurely. All attempts to
interrupt an awaiting thread via an InterruptedException
are being ignored.
| Nested Class Summary | |
static class |
RogueBarrier.Test
|
| Constructor Summary | |
RogueBarrier(int parties)
Creates a new RogueBarrier that will trip when the given number of parties (threads) are waiting upon it. |
|
| Method Summary | |
int |
await()
Waits until all parties have invoked await on this barrier. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public RogueBarrier(int parties)
parties - the number of threads that must invoke await()
before the barrier is tripped.
java.lang.IllegalArgumentException - if parties is less than 1.| Method Detail |
public int await()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||