
public abstract class WaarpCompletedFuture extends WaarpFuture
| Modifier | Constructor and Description |
|---|---|
protected |
WaarpCompletedFuture() |
| Modifier and Type | Method and Description |
|---|---|
WaarpFuture |
await()
Waits for this future to be completed.
|
boolean |
await(long timeoutMillis)
Waits for this future to be completed within the specified time limit.
|
boolean |
await(long timeout,
TimeUnit unit)
Waits for this future to be completed within the specified time limit.
|
WaarpFuture |
awaitUninterruptibly()
Waits for this future to be completed without interruption.
|
boolean |
awaitUninterruptibly(long timeoutMillis)
Waits for this future to be completed within the specified time limit without interruption.
|
boolean |
awaitUninterruptibly(long timeout,
TimeUnit unit)
Waits for this future to be completed within the specified time limit without interruption.
|
boolean |
cancel()
Cancels the operation associated with this future and notifies all listeners if canceled
successfully.
|
boolean |
isCancelled()
Returns
true if and only if this future was canceled by a WaarpFuture.cancel() method. |
boolean |
isDone()
Returns
true if and only if this future is complete, regardless of whether the
operation was successful, failed, or canceled. |
boolean |
setFailure(Throwable cause)
Marks this future as a failure and notifies all listeners.
|
boolean |
setSuccess()
Marks this future as a success and notifies all listeners.
|
getCause, isFailed, isSuccess, reset, rethrowIfFailedpublic WaarpFuture await() throws InterruptedException
WaarpFutureawait in class WaarpFutureInterruptedException - if the current thread was interruptedpublic boolean await(long timeout,
TimeUnit unit)
throws InterruptedException
WaarpFutureawait in class WaarpFuturetrue if and only if the future was completed within the specified time limitInterruptedException - if the current thread was interruptedpublic boolean await(long timeoutMillis)
throws InterruptedException
WaarpFutureawait in class WaarpFuturetrue if and only if the future was completed within the specified time limitInterruptedException - if the current thread was interruptedpublic WaarpFuture awaitUninterruptibly()
WaarpFutureInterruptedException and
discards it silently.awaitUninterruptibly in class WaarpFuturepublic boolean awaitUninterruptibly(long timeout,
TimeUnit unit)
WaarpFutureInterruptedException and discards it silently.awaitUninterruptibly in class WaarpFuturetrue if and only if the future was completed within the specified time limitpublic boolean awaitUninterruptibly(long timeoutMillis)
WaarpFutureInterruptedException and discards it silently.awaitUninterruptibly in class WaarpFuturetrue if and only if the future was completed within the specified time limitpublic boolean isDone()
WaarpFuturetrue if and only if this future is complete, regardless of whether the
operation was successful, failed, or canceled.isDone in class WaarpFuturepublic boolean setFailure(Throwable cause)
WaarpFuturesetFailure in class WaarpFuturetrue if and only if successfully marked this future as a failure. Otherwise false because this
future is already marked as either a success or a failure.public boolean setSuccess()
WaarpFuturesetSuccess in class WaarpFuturetrue if and only if successfully marked this future as a success. Otherwise false because this
future is already marked as either a success or a failure.public boolean cancel()
WaarpFuturecancel in class WaarpFuturetrue if and only if the operation has been canceled. false if the
operation can't be canceled or is already completed.public boolean isCancelled()
WaarpFuturetrue if and only if this future was canceled by a WaarpFuture.cancel() method.isCancelled in class WaarpFutureCopyright © 2009–2019 Waarp. All rights reserved.