public interface ProgressivePromise<V> extends Promise<V>, ProgressiveFuture<V>
ProgressiveFuture which is writable.| 限定符和类型 | 方法和说明 |
|---|---|
ProgressivePromise<V> |
addListener(GenericFutureListener<? extends Future<? super V>> listener)
Adds the specified listener to this future.
|
ProgressivePromise<V> |
addListeners(GenericFutureListener<? extends Future<? super V>>... listeners)
Adds the specified listeners to this future.
|
ProgressivePromise<V> |
await()
Waits for this future to be completed.
|
ProgressivePromise<V> |
awaitUninterruptibly()
Waits for this future to be completed without
interruption.
|
ProgressivePromise<V> |
removeListener(GenericFutureListener<? extends Future<? super V>> listener)
Removes the first occurrence of the specified listener from this future.
|
ProgressivePromise<V> |
removeListeners(GenericFutureListener<? extends Future<? super V>>... listeners)
Removes the first occurrence for each of the listeners from this future.
|
ProgressivePromise<V> |
setFailure(java.lang.Throwable cause)
Marks this future as a failure and notifies all
listeners.
|
ProgressivePromise<V> |
setProgress(long progress,
long total)
Sets the current progress of the operation and notifies the listeners that implement
GenericProgressiveFutureListener. |
ProgressivePromise<V> |
setSuccess(V result)
Marks this future as a success and notifies all
listeners.
|
ProgressivePromise<V> |
sync()
Waits for this future until it is done, and rethrows the cause of the failure if this future
failed.
|
ProgressivePromise<V> |
syncUninterruptibly()
Waits for this future until it is done, and rethrows the cause of the failure if this future
failed.
|
boolean |
tryProgress(long progress,
long total)
Tries to set the current progress of the operation and notifies the listeners that implement
GenericProgressiveFutureListener. |
setUncancellable, tryFailure, trySuccessawait, await, awaitUninterruptibly, awaitUninterruptibly, cancel, cause, getNow, isCancellable, isSuccessProgressivePromise<V> setProgress(long progress, long total)
GenericProgressiveFutureListener.boolean tryProgress(long progress,
long total)
GenericProgressiveFutureListener. If the operation is already complete or the progress is out of range,
this method does nothing but returning false.ProgressivePromise<V> setSuccess(V result)
PromiseIllegalStateException.setSuccess 在接口中 Promise<V>ProgressivePromise<V> setFailure(java.lang.Throwable cause)
PromiseIllegalStateException.setFailure 在接口中 Promise<V>ProgressivePromise<V> addListener(GenericFutureListener<? extends Future<? super V>> listener)
FutureaddListener 在接口中 ProgressiveFuture<V>addListener 在接口中 Promise<V>ProgressivePromise<V> addListeners(GenericFutureListener<? extends Future<? super V>>... listeners)
FutureaddListeners 在接口中 ProgressiveFuture<V>addListeners 在接口中 Promise<V>ProgressivePromise<V> removeListener(GenericFutureListener<? extends Future<? super V>> listener)
FutureremoveListener 在接口中 ProgressiveFuture<V>removeListener 在接口中 Promise<V>ProgressivePromise<V> removeListeners(GenericFutureListener<? extends Future<? super V>>... listeners)
FutureremoveListeners 在接口中 ProgressiveFuture<V>removeListeners 在接口中 Promise<V>ProgressivePromise<V> await() throws java.lang.InterruptedException
FutureProgressivePromise<V> awaitUninterruptibly()
FutureInterruptedException and
discards it silently.awaitUninterruptibly 在接口中 ProgressiveFuture<V>awaitUninterruptibly 在接口中 Promise<V>ProgressivePromise<V> sync() throws java.lang.InterruptedException
FutureProgressivePromise<V> syncUninterruptibly()
FuturesyncUninterruptibly 在接口中 ProgressiveFuture<V>syncUninterruptibly 在接口中 Promise<V>