|
Oracle® Coherence Java API Reference Release 12.1.2.0.3 E26043-02 |
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Object
com.tangosol.util.SingleWaiterMultiNotifier
public class SingleWaiterMultiNotifier
A Condition-like object, used by a single thread to block for a notification, and optimized for many concurrent notifications by other threads. Basically, this is a blocking queue without any state to actually enqueue: the await() method is analogous to an imaginary "take all" variant of the BlockingQueue.take() method, and the signal() method is analogous to BlockingQueue.put().
Note that no synchronization is needed to use this class; i.e. clients must not synchronize on this class prior to calling await() or signal(), nor should the use any of the primitive wait() or notify() methods.
| Constructor Summary | |
|---|---|
SingleWaiterMultiNotifier() |
|
| Method Summary | |
|---|---|
void |
await()Wait for a notification (which may have already occurred). |
void |
signal()Notifies the waiting thread, waking it up if it is asleep, or preventing it from going to sleep the next time it attempts to wait. |
| Constructor Detail |
|---|
public SingleWaiterMultiNotifier()
| Method Detail |
|---|
public void await()
throws java.lang.InterruptedException
java.lang.InterruptedException - if the calling thread is interrupted while it is waitingpublic void signal()
|
Oracle® Coherence Java API Reference Release 12.1.2.0.3 E26043-02 |
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||