Class WaitQueue.AbstractSignal
- java.lang.Object
-
- org.apache.cassandra.utils.concurrent.WaitQueue.AbstractSignal
-
- All Implemented Interfaces:
WaitQueue.Signal
- Enclosing class:
- WaitQueue
public abstract static class WaitQueue.AbstractSignal extends java.lang.Object implements WaitQueue.Signal
An abstract signal implementation
-
-
Constructor Summary
Constructors Constructor Description AbstractSignal()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidawait()Wait until signalled, or throw an InterruptedException if interrupted before this happens.voidawaitUninterruptibly()Wait, without throwing InterruptedException, until signalled.booleanawaitUntil(long until)Wait until signalled, or the provided time is reached, or the thread is interrupted.booleanawaitUntilUninterruptibly(long until)Wait until signalled, or the provided time is reached, or the thread is interrupted.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.cassandra.utils.concurrent.WaitQueue.Signal
cancel, checkAndClear, isCancelled, isSet, isSignalled
-
-
-
-
Method Detail
-
awaitUninterruptibly
public void awaitUninterruptibly()
Description copied from interface:WaitQueue.SignalWait, without throwing InterruptedException, until signalled. On exit isSignalled() must be true. If the thread is interrupted in the meantime, the interrupted flag will be set.- Specified by:
awaitUninterruptiblyin interfaceWaitQueue.Signal
-
await
public void await() throws java.lang.InterruptedExceptionDescription copied from interface:WaitQueue.SignalWait until signalled, or throw an InterruptedException if interrupted before this happens. On normal exit isSignalled() must be true; however if InterruptedException is thrown isCancelled() will be true.- Specified by:
awaitin interfaceWaitQueue.Signal- Throws:
java.lang.InterruptedException
-
awaitUntil
public boolean awaitUntil(long until) throws java.lang.InterruptedExceptionDescription copied from interface:WaitQueue.SignalWait until signalled, or the provided time is reached, or the thread is interrupted. If signalled, isSignalled() will be true on exit, and the method will return true; if timedout, the method will return false and isCancelled() will be true; if interrupted an InterruptedException will be thrown and isCancelled() will be true.- Specified by:
awaitUntilin interfaceWaitQueue.Signal- Parameters:
until- System.nanoTime() to wait until- Returns:
- true if signalled, false if timed out
- Throws:
java.lang.InterruptedException
-
awaitUntilUninterruptibly
public boolean awaitUntilUninterruptibly(long until)
Description copied from interface:WaitQueue.SignalWait until signalled, or the provided time is reached, or the thread is interrupted. If signalled, isSignalled() will be true on exit, and the method will return true; if timedout, the method will return false and isCancelled() will be true- Specified by:
awaitUntilUninterruptiblyin interfaceWaitQueue.Signal- Parameters:
until- System.nanoTime() to wait until- Returns:
- true if signalled, false if timed out
-
-