Skip navigation links

Oracle® Coherence Java API Reference
Release 12.1.2.0.3

E26043-02


com.tangosol.util
Class SingleWaiterMultiNotifier

java.lang.Object
  extended by com.tangosol.util.SingleWaiterMultiNotifier


public class SingleWaiterMultiNotifier
extends java.lang.Object

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.

Since:
Coherence 3.7
Author:
cp 2010-06-15

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

SingleWaiterMultiNotifier

public SingleWaiterMultiNotifier()

Method Detail

await

public void await()
           throws java.lang.InterruptedException
Wait for a notification (which may have already occurred). Note that spurious wake-ups are possible.
Throws:
java.lang.InterruptedException - if the calling thread is interrupted while it is waiting

signal

public 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.

Skip navigation links

Oracle® Coherence Java API Reference
Release 12.1.2.0.3

E26043-02


Copyright © 2000, 2014, Oracle and/or its affiliates. All rights reserved.