public class MutexSetCV extends CObject implements SyncCV
This class follows DbC(tm) methodology
(Wikipedia).
Where possible, contracts are implement with native's Java
assert.
Constructor and Description |
---|
MutexSetCV(Mutex[] set)
Constructs a new MutexSet with an ordered set of Mutex objects (the locking order is the array's index order).
|
Modifier and Type | Method and Description |
---|---|
void |
await()
Object's wait replacement, in which:
- the checked exception InterruptedException, is replaced by the unchecked exception ThreadInterruptedException; - supports the registration of waiting threads for interrupt purposes. |
void |
broadcast()
Object's nofifyAll replacement.
|
boolean |
lockIsMine()
Is lock owned by me?
|
void |
signal()
Object's nofify replacement.
|
await, await, interruptWaitingThreads, registerAwaitingThreads, syncronizedLockIsMine
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
interruptWaitingThreads, registerAwaitingThreads
public MutexSetCV(Mutex[] set)
set != null && set.length > 0
set
- the ordered set of Mutex objectspublic void await()
CObject
syncronizedLockIsMine()
- native lock owned by mepublic void signal()
CObject
syncronizedLockIsMine()
- native lock owned by mepublic void broadcast()
CObject
syncronizedLockIsMine()
- native lock owned by mepublic boolean lockIsMine()
CObject
lockIsMine
in interface SyncCV
lockIsMine
in class CObject