public interface WaitableFuture
true is returned
from one of the awaitXXX methods then the operation has completed.
However, the caller has to determine whether it was a successful or
failed completion.| Modifier and Type | Method and Description |
|---|---|
default boolean |
await()
Wait
Long.MAX_VALUE msec. for the asynchronous operation to complete. |
boolean |
await(long timeoutMillis)
Wait for the asynchronous operation to complete with the specified timeout.
|
default boolean |
await(long timeout,
TimeUnit unit)
Wait for the asynchronous operation to complete with the specified timeout.
|
default boolean |
awaitUninterruptibly()
Wait
Long.MAX_VALUE msec. for the asynchronous operation to complete
uninterruptibly. |
boolean |
awaitUninterruptibly(long timeoutMillis)
Wait for the asynchronous operation to complete with the specified timeout
uninterruptibly.
|
default boolean |
awaitUninterruptibly(long timeout,
TimeUnit unit)
Wait for the asynchronous operation to complete with the specified timeout
uninterruptibly.
|
boolean |
isDone() |
default boolean await()
throws IOException
Long.MAX_VALUE msec. for the asynchronous operation to complete.
The attached listeners will be notified when the operation is
completed.true if the operation is completed.IOException - if failed - specifically InterruptedIOException
if waiting was interruptedawait(long)default boolean await(long timeout,
TimeUnit unit)
throws IOException
timeout - The number of time units to waitunit - The TimeUnit for waitingtrue if the operation is completed.IOException - if failed - specifically InterruptedIOException
if waiting was interruptedawait(long)boolean await(long timeoutMillis)
throws IOException
timeoutMillis - Wait time in millisecondstrue if the operation is completed.IOException - if failed - specifically InterruptedIOException
if waiting was interrupteddefault boolean awaitUninterruptibly()
Long.MAX_VALUE msec. for the asynchronous operation to complete
uninterruptibly. The attached listeners will be notified when the operation is
completed.true if the operation is completed.awaitUninterruptibly(long)default boolean awaitUninterruptibly(long timeout,
TimeUnit unit)
timeout - The number of time units to waitunit - The TimeUnit for waitingtrue if the operation is completed.awaitUninterruptibly(long)boolean awaitUninterruptibly(long timeoutMillis)
timeoutMillis - Wait time in millisecondstrue if the operation is finished.boolean isDone()
true if the asynchronous operation is completed. Note:
it is up to the caller to determine whether it was a successful or
failed completion.Copyright © 2008–2017 The Apache Software Foundation. All rights reserved.