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
A barebones
Awaitable 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 -
Method Summary
Modifier and TypeMethodDescriptionawait()booleanawaitUntil(long nanoTimeDeadline) protected abstract booleanReturn true once signalled.static booleanMethods inherited from class org.apache.cassandra.utils.concurrent.Awaitable.AbstractAwaitable
await, awaitThrowUncheckedOnInterrupt, awaitThrowUncheckedOnInterrupt, awaitUninterruptibly, awaitUninterruptibly, awaitUntilThrowUncheckedOnInterrupt, awaitUntilUninterruptibly
-
Constructor Details
-
SyncAwaitable
protected SyncAwaitable()
-
-
Method Details
-
await
- Throws:
InterruptedException- if interrupted
-
awaitUntil
- Returns:
- true if we were signalled, false if the deadline elapsed
- Throws:
InterruptedException- if interrupted
-
isSignalled
protected abstract boolean isSignalled()Return true once signalled. Unidirectional; once true, must never again be false. -
waitUntil
- Throws:
InterruptedException
-