|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.concurrent.CyclicBarrier
com.kuka.roboticsAPI.concurrencyModel.SyncHandle
public final class SyncHandle
Handle for cyclic synchronization of threads. Using the await method forces the thread to block until all other parties arrived at this synchronization point. After all parties arrived, the handle is reset and can be used again.
By manually calling reset, all waiting threads will get released with an exception.
| Constructor Summary | |
|---|---|
SyncHandle(String name,
int parties)
Creates a new instance fo the SyncHandle class. |
|
| Method Summary | |
|---|---|
int |
await()
Waits for other threads to reach the synchronization point. |
int |
await(long timeout,
TimeUnit unit)
Waits for other threads to reach the synchronization point. |
String |
getName()
Gets the name of the handle. |
String |
toString()
|
| Methods inherited from class java.util.concurrent.CyclicBarrier |
|---|
getNumberWaiting, getParties, isBroken, reset |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public SyncHandle(String name,
int parties)
name - name for the handle.parties - number of participating threads.| Method Detail |
|---|
public String getName()
public int await()
await in class CyclicBarrier
public int await(long timeout,
TimeUnit unit)
await in class CyclicBarriertimeout - The timeout to wait until the thread will return.unit - The timeunit for the timeout.
public String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||