|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectpt.ua.concurrent.CObject
pt.ua.concurrent.TransientSignal
public class TransientSignal
A transient signal module (signals thrown away if no one is waiting). This mechanism is similar to the behavior of the signal/await of a condition variable.
This class follows DbC(tm) methodology
(Wikipedia).
Where possible, contracts are implement with native's Java assert.
| Constructor Summary | |
|---|---|
TransientSignal()
Constructs a new TransientSignal registering waiting threads. |
|
TransientSignal(boolean registerAwaitingThreads)
Constructs a new TransientSignal. |
|
| Method Summary | |
|---|---|
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 |
send()
Signaling (sender). |
| Methods inherited from class pt.ua.concurrent.CObject |
|---|
await, await, broadcast, interruptWaitingThreads, lockIsMine, registerAwaitingThreads, signal, syncronizedLockIsMine |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface pt.ua.concurrent.InterruptibleAwaitingThreads |
|---|
interruptWaitingThreads, registerAwaitingThreads |
| Constructor Detail |
|---|
public TransientSignal()
public TransientSignal(boolean registerAwaitingThreads)
registerAwaitingThreads - if true, threads are registered when waiting| Method Detail |
|---|
public void send()
Signal
send in interface Signalpublic void await()
CObject
syncronizedLockIsMine() - native lock owned by me
await in interface Signalawait in interface SyncCVawait in class CObject
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||