Class Awaitable.SyncAwaitable
- java.lang.Object
-
- org.apache.cassandra.utils.concurrent.Awaitable.AbstractAwaitable
-
- org.apache.cassandra.utils.concurrent.Awaitable.SyncAwaitable
-
- All Implemented Interfaces:
Awaitable
- Direct Known Subclasses:
Condition.Sync
,CountDownLatch.Sync
- Enclosing interface:
- Awaitable
public abstract static class Awaitable.SyncAwaitable extends Awaitable.AbstractAwaitable
A barebonesAwaitable
that uses mutual exclusion. If your state will be updated while holding the object monitor, extend this class.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.cassandra.utils.concurrent.Awaitable
Awaitable.AbstractAwaitable, Awaitable.AsyncAwaitable, Awaitable.Defaults, Awaitable.SyncAwaitable
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
SyncAwaitable()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description Awaitable
await()
boolean
awaitUntil(long nanoTimeDeadline)
protected abstract boolean
isSignalled()
Return true once signalled.static boolean
waitUntil(java.lang.Object monitor, long deadlineNanos)
-
Methods inherited from class org.apache.cassandra.utils.concurrent.Awaitable.AbstractAwaitable
await, awaitThrowUncheckedOnInterrupt, awaitThrowUncheckedOnInterrupt, awaitUninterruptibly, awaitUninterruptibly, awaitUntilThrowUncheckedOnInterrupt, awaitUntilUninterruptibly
-
-
-
-
Method Detail
-
await
public Awaitable await() throws java.lang.InterruptedException
- Throws:
java.lang.InterruptedException
- if interrupted
-
awaitUntil
public boolean awaitUntil(long nanoTimeDeadline) throws java.lang.InterruptedException
- Returns:
- true if we were signalled, false if the deadline elapsed
- Throws:
java.lang.InterruptedException
- if interrupted
-
isSignalled
protected abstract boolean isSignalled()
Return true once signalled. Unidirectional; once true, must never again be false.
-
waitUntil
public static boolean waitUntil(java.lang.Object monitor, long deadlineNanos) throws java.lang.InterruptedException
- Throws:
java.lang.InterruptedException
-
-