public abstract static class Awaitable.SyncAwaitable extends Awaitable.AbstractAwaitable
Awaitable
that uses mutual exclusion.
If your state will be updated while holding the object monitor, extend this class.Awaitable.AbstractAwaitable, Awaitable.AsyncAwaitable, Awaitable.Defaults, Awaitable.SyncAwaitable
Modifier | Constructor and Description |
---|---|
protected |
SyncAwaitable() |
Modifier and Type | Method and Description |
---|---|
Awaitable |
await()
|
boolean |
awaitUntil(long nanoTimeDeadline)
|
protected abstract boolean |
isSignalled()
Return true once signalled.
|
static boolean |
waitUntil(java.lang.Object monitor,
long deadlineNanos) |
await, awaitThrowUncheckedOnInterrupt, awaitThrowUncheckedOnInterrupt, awaitUninterruptibly, awaitUninterruptibly, awaitUntilThrowUncheckedOnInterrupt, awaitUntilUninterruptibly
public Awaitable await() throws java.lang.InterruptedException
java.lang.InterruptedException
- if interruptedpublic boolean awaitUntil(long nanoTimeDeadline) throws java.lang.InterruptedException
java.lang.InterruptedException
- if interruptedprotected abstract boolean isSignalled()
public static boolean waitUntil(java.lang.Object monitor, long deadlineNanos) throws java.lang.InterruptedException
java.lang.InterruptedException
Copyright © 2009- The Apache Software Foundation