public interface Awaitable
Awaitable
may be waited on without a loop,
as this interface declares that there are no spurious wake-ups.Modifier and Type | Interface and Description |
---|---|
static class |
Awaitable.AbstractAwaitable |
static class |
Awaitable.AsyncAwaitable
A barebones asynchronous
Awaitable . |
static class |
Awaitable.Defaults |
static class |
Awaitable.SyncAwaitable
A barebones
Awaitable that uses mutual exclusion. |
Modifier and Type | Method and Description |
---|---|
Awaitable |
await()
Await indefinitely, throwing any interrupt.
|
boolean |
await(long time,
java.util.concurrent.TimeUnit units)
Await for the specified period, throwing any interrupt.
|
Awaitable |
awaitThrowUncheckedOnInterrupt()
Await indefinitely, throwing any interrupt as an unchecked exception.
|
boolean |
awaitThrowUncheckedOnInterrupt(long time,
java.util.concurrent.TimeUnit units)
Await for the specified period, throwing any interrupt as an unchecked exception.
|
Awaitable |
awaitUninterruptibly()
Await indefinitely, ignoring interrupts (but maintaining the interrupt flag on exit).
|
boolean |
awaitUninterruptibly(long time,
java.util.concurrent.TimeUnit units)
Await until the deadline (in nanoTime), ignoring interrupts (but maintaining the interrupt flag on exit).
|
boolean |
awaitUntil(long nanoTimeDeadline)
Await until the deadline (in nanoTime), throwing any interrupt.
|
boolean |
awaitUntilThrowUncheckedOnInterrupt(long nanoTimeDeadline)
Await until the deadline (in nanoTime), throwing any interrupt as an unchecked exception.
|
boolean |
awaitUntilUninterruptibly(long nanoTimeDeadline)
Await until the deadline (in nanoTime), ignoring interrupts (but maintaining the interrupt flag on exit).
|
boolean awaitUntil(long nanoTimeDeadline) throws java.lang.InterruptedException
java.lang.InterruptedException
- if interruptedboolean awaitUntilThrowUncheckedOnInterrupt(long nanoTimeDeadline) throws UncheckedInterruptedException
UncheckedInterruptedException
- if interruptedboolean awaitUntilUninterruptibly(long nanoTimeDeadline)
boolean await(long time, java.util.concurrent.TimeUnit units) throws java.lang.InterruptedException
java.lang.InterruptedException
- if interruptedboolean awaitThrowUncheckedOnInterrupt(long time, java.util.concurrent.TimeUnit units) throws UncheckedInterruptedException
UncheckedInterruptedException
- if interruptedboolean awaitUninterruptibly(long time, java.util.concurrent.TimeUnit units)
Awaitable await() throws java.lang.InterruptedException
java.lang.InterruptedException
- if interruptedAwaitable awaitThrowUncheckedOnInterrupt() throws UncheckedInterruptedException
UncheckedInterruptedException
- if interruptedAwaitable awaitUninterruptibly()
Copyright © 2009-2022 The Apache Software Foundation