|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.kuka.common.concurrent.SetResetBarrier
public final class SetResetBarrier
A synchronization aid that keeps two states, each of which can be waited upon.
| Constructor Summary | |
|---|---|
SetResetBarrier()
Creates a new set-reset barrier with a default "reset" state. |
|
SetResetBarrier(boolean initialState)
Creates a new set-reset barrier with the given initial state. |
|
| Method Summary | |
|---|---|
boolean |
compareAndSet(boolean expect,
boolean update)
Atomically sets the value to the given updated value if the current value == the expected value. |
IWaitToken |
getResetToken()
Returns the wait token for the "reset" state. |
IWaitToken |
getSetToken()
Returns the wait token for the "set" state. |
boolean |
isSet()
Return true if the state is "set", false if the state is "reset". |
void |
reset()
Sets the state of the barrier to "reset". |
void |
set()
Sets the state of the barrier to "set". |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public SetResetBarrier()
public SetResetBarrier(boolean initialState)
initialState - the initial state, true - if set.| Method Detail |
|---|
public void set()
public void reset()
public boolean isSet()
public boolean compareAndSet(boolean expect,
boolean update)
== the expected value.
expect - the expected valueupdate - the new value
public IWaitToken getSetToken()
public IWaitToken getResetToken()
public String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||