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 |
---|---|
boolean |
await()
Wait
Long.MAX_VALUE msec. |
boolean |
await(long timeoutMillis)
Wait for the asynchronous operation to complete with the specified timeout.
|
boolean |
await(long timeout,
TimeUnit unit)
Wait for the asynchronous operation to complete with the specified timeout.
|
boolean |
awaitUninterruptibly()
Wait
Long.MAX_VALUE msec. |
boolean |
awaitUninterruptibly(long timeoutMillis)
Wait for the asynchronous operation to complete with the specified timeout
uninterruptibly.
|
boolean |
awaitUninterruptibly(long timeout,
TimeUnit unit)
Wait for the asynchronous operation to complete with the specified timeout
uninterruptibly.
|
boolean |
isDone() |
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)
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 interruptedboolean 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)
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–2016 The Apache Software Foundation. All rights reserved.