|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Sync
Java's interface for locks.
This class follows DbC(tm) methodology
(Wikipedia).
Where possible, contracts are implement with native's Java
assert.
Method Summary | |
---|---|
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. |
Methods inherited from interface pt.ua.concurrent.InterruptibleAwaitingThreads |
---|
interruptWaitingThreads, registerAwaitingThreads |
Method Detail |
---|
boolean 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
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |