|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
public interface StateLock
A mechanism for allowing actions to be performed synchronously with respect to state change.
| Method Summary | |
|---|---|
boolean |
tryToWhen(StateCondition when,
Runnable runnable)
Try to acquire the lock, and then do something when the condition is true. |
boolean |
waitToWhen(StateCondition when,
Runnable runnable)
Wait to do something when the condition is true. |
| Method Detail |
|---|
boolean tryToWhen(StateCondition when,
Runnable runnable)
throws OddjobLockedException
OddjobLockedException
is thrown.
when - The condition.runnable - The action.
OddjobLockedException - If the lock can not be acquired.
boolean waitToWhen(StateCondition when,
Runnable runnable)
throws InterruptedException
when - The condition.runnable - The action.
InterruptedException - If the wait is interrupted.
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||