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, syncronizedLockIsMineequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitinterruptWaitingThreads, registerAwaitingThreadspublic MutexSetCV(Mutex[] set)
set != null && set.length > 0set - the ordered set of Mutex objectspublic void await()
CObjectsyncronizedLockIsMine() - native lock owned by mepublic void signal()
CObjectsyncronizedLockIsMine() - native lock owned by mepublic void broadcast()
CObjectsyncronizedLockIsMine() - native lock owned by mepublic boolean lockIsMine()
CObjectlockIsMine in interface SyncCVlockIsMine in class CObject