|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectcom.clarkware.junitperf.ThreadBarrier
public class ThreadBarrier
The ThreadBarrier class provides a callback
method for threads to signal their completion.
| Field Summary | |
|---|---|
int |
dispatchedCount
|
int |
returnedCount
|
| Constructor Summary | |
|---|---|
ThreadBarrier(int numDispatched)
Constructs a ThreadBarrier with the
specified number of threads to wait for. |
|
| Method Summary | |
|---|---|
void |
cancelThreads(int threadCount)
Cancels the specified number of threads. |
boolean |
isReached()
Determines whether the thread barrier has been reached - when all dispatched threads have returned. |
void |
onCompletion(java.lang.Thread t)
Called when the specified thread is complete. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public int returnedCount
public final int dispatchedCount
| Constructor Detail |
|---|
public ThreadBarrier(int numDispatched)
ThreadBarrier with the
specified number of threads to wait for.
numDispatched - Number of threads dispatched.| Method Detail |
|---|
public void onCompletion(java.lang.Thread t)
t - Completed thread.public boolean isReached()
true if the barrier has been reached;
false otherwise.public void cancelThreads(int threadCount)
threadCount - Number of threads to cancel.
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||