public interface IFuture<V> extends Future<V>
Modifier and Type | Method and Description |
---|---|
IFuture<V> |
await()
Waits for this future to be completed.
|
IFuture<V> |
await(long timeoutMillis)
Waits for this future to be completed within the specified time limit.
|
IFuture<V> |
await(long timeout,
TimeUnit unit)
Waits for this future to be completed within the specified time limit.
|
IFuture<V> |
awaitUninterruptibly()
Waits for this future to be completed without interruption.
|
IFuture<V> |
awaitUninterruptibly(long timeoutMillis)
Waits for this future to be completed within the specified time limit
without interruption.
|
IFuture<V> |
awaitUninterruptibly(long timeout,
TimeUnit unit)
Waits for this future to be completed within the specified time limit
without interruption.
|
Throwable |
cause()
Returns the cause of the failed I/O operation.
|
V |
getNow()
Returns the result without blocking, or
null if this future is not done
yet or when null is expected value. |
ISession |
getSession()
Returns the session this future is associated with.
|
boolean |
isFailed()
Tells if the operation associated with this future was completed
with a failure.
|
boolean |
isSuccessful()
Tells if the operation associated with this future was completed
successfully.
|
IFuture<V> |
sync()
Waits for this future to be completed, and throws an exception that wraps
the cause of the failure if this future failed.
|
IFuture<V> |
sync(long timeoutMillis)
Waits for this future to be completed within the specified time limit,
and throws an exception that wraps the cause of the failure if this
future failed.
|
IFuture<V> |
sync(long timeout,
TimeUnit unit)
Waits for this future to be completed within the specified time limit,
and throws an exception that wraps the cause of the failure if this
future failed.
|
IFuture<V> |
syncUninterruptibly()
Waits for this future to be completed without interruption, and throws an
exception that wraps the cause of the failure if this future failed.
|
IFuture<V> |
syncUninterruptibly(long timeoutMillis)
Waits for this future to be completed within the specified time limit
without interruption, and throws an exception that wraps the cause of the
failure if this future failed.
|
IFuture<V> |
syncUninterruptibly(long timeout,
TimeUnit unit)
Waits for this future to be completed within the specified time limit
without interruption, and throws an exception that wraps the cause of the
failure if this future failed.
|
IFuture<V> await() throws InterruptedException
InterruptedException
- if the current thread was interrupted.IFuture<V> await(long timeoutMillis) throws InterruptedException
timeoutMillis
- the time limit in milliseconds to waitInterruptedException
- if the current thread was interrupted.IFuture<V> await(long timeout, TimeUnit unit) throws InterruptedException
timeout
- the time limit to waitunit
- the time unit of the time limitInterruptedException
- if the current thread was interrupted.IFuture<V> awaitUninterruptibly()
IFuture<V> awaitUninterruptibly(long timeoutMillis)
timeoutMillis
- the time limit in milliseconds to waitIFuture<V> awaitUninterruptibly(long timeout, TimeUnit unit)
timeout
- the time limit to waitunit
- the time unit of the time limitIFuture<V> sync() throws InterruptedException, ExecutionException
InterruptedException
- if the current thread was interrupted.ExecutionException
- if this future failedCancellationException
- if this future was cancelledIFuture<V> sync(long timeoutMillis) throws InterruptedException, ExecutionException, TimeoutException
timeoutMillis
- the time limit in milliseconds to waitInterruptedException
- if the current thread was interrupted.ExecutionException
- if this future failedTimeoutException
- if the time limit expired without completion of this futureCancellationException
- if this future was cancelledIFuture<V> sync(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException
timeout
- the time limit to waitunit
- the time unit of the time limitInterruptedException
- if the current thread was interrupted.ExecutionException
- if this future failedTimeoutException
- if the time limit expired without completion of this futureCancellationException
- if this future was cancelledIFuture<V> syncUninterruptibly() throws ExecutionException
ExecutionException
- if this future failedCancellationException
- if this future was cancelledIFuture<V> syncUninterruptibly(long timeoutMillis) throws ExecutionException, TimeoutException
timeoutMillis
- the time limit in milliseconds to waitExecutionException
- if this future failedTimeoutException
- if the time limit expired without completion of this futureCancellationException
- if this future was cancelledIFuture<V> syncUninterruptibly(long timeout, TimeUnit unit) throws ExecutionException, TimeoutException
timeout
- the time limit to waitunit
- the time unit of the time limitExecutionException
- if this future failedTimeoutException
- if the time limit expired without completion of this futureCancellationException
- if this future was cancelledISession getSession()
V getNow()
null
if this future is not done
yet or when null
is expected value.Throwable cause()
null
if succeeded or
this future is not completed yet.boolean isSuccessful()
true
if and only if the associated operation was
completed successfullyboolean isFailed()
true
if and only if the associated operation was
completed with a failureCopyright © 2017–2022 SNF4J.ORG. All rights reserved.