Class WaitQueue.Standard
java.lang.Object
org.apache.cassandra.utils.concurrent.WaitQueue.Standard
- All Implemented Interfaces:
WaitQueue
- Enclosing interface:
- WaitQueue
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classAn abstract signal implementation TODO: use intrusive linked listNested classes/interfaces inherited from interface org.apache.cassandra.utils.concurrent.WaitQueue
WaitQueue.Signal, WaitQueue.Standard -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintReturn how many threads are waitingbooleangetWaiting() > 0register()The calling thread MUST be the thread that uses the signal<V> WaitQueue.SignalThe calling thread MUST be the thread that uses the signal.booleansignal()Signal one waiting threadvoidSignal all waiting threads
-
Constructor Details
-
Standard
protected Standard()
-
-
Method Details
-
register
The calling thread MUST be the thread that uses the signal -
register
The calling thread MUST be the thread that uses the signal. If the Signal is waited on, context.stop() will be called when the wait times out, the Signal is signalled, or the waiting thread is interrupted. -
signal
public boolean signal()Signal one waiting thread -
signalAll
public void signalAll()Signal all waiting threads -
hasWaiters
public boolean hasWaiters()Description copied from interface:WaitQueuegetWaiting() > 0- Specified by:
hasWaitersin interfaceWaitQueue
-
getWaiting
public int getWaiting()Description copied from interface:WaitQueueReturn how many threads are waiting- Specified by:
getWaitingin interfaceWaitQueue- Returns:
- how many threads are waiting
-