public interface Sync extends InterruptibleAwaitingThreads
This class follows DbC(tm) methodology
(Wikipedia).
Where possible, contracts are implement with native's Java assert.
| Modifier and Type | Method and Description |
|---|---|
SyncState |
getStateAndUnlock()
Get current Sync state, and unlock it (if applicable).
|
boolean |
lockIsMine()
Is lock owned by me?
|
SyncCV |
newCV()
Create and return a new condition variable attached to current Sync.
|
void |
recoverState(SyncState state)
Recover Sync state.
|
interruptWaitingThreads, registerAwaitingThreadsboolean lockIsMine()
SyncCV newCV()
SyncState getStateAndUnlock()
lockIsMine()void recoverState(SyncState state) throws ThreadInterruptedException
state != null && state.obj() == this - my state object required!lockIsMine()state - Sync state object (returned by getStateAndUnlock)ThreadInterruptedException