public interface ProgressivePromise<V> extends Promise<V>, ProgressiveFuture<V>
ProgressiveFuture which is writable.| Modifier and Type | Method and Description |
|---|---|
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 specified listener from this future.
|
ProgressivePromise<V> |
removeListeners(GenericFutureListener<? extends Future<? super V>>... listeners)
Removes the specified listeners from this future.
|
ProgressivePromise<V> |
setFailure(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, isSuccessget, get, isCancelled, isDoneProgressivePromise<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 in interface Promise<V>ProgressivePromise<V> setFailure(Throwable cause)
PromiseIllegalStateException.setFailure in interface Promise<V>ProgressivePromise<V> addListener(GenericFutureListener<? extends Future<? super V>> listener)
FutureaddListener in interface ProgressiveFuture<V>addListener in interface Promise<V>ProgressivePromise<V> addListeners(GenericFutureListener<? extends Future<? super V>>... listeners)
FutureaddListeners in interface ProgressiveFuture<V>addListeners in interface Promise<V>ProgressivePromise<V> removeListener(GenericFutureListener<? extends Future<? super V>> listener)
FutureremoveListener in interface ProgressiveFuture<V>removeListener in interface Promise<V>ProgressivePromise<V> removeListeners(GenericFutureListener<? extends Future<? super V>>... listeners)
FutureremoveListeners in interface ProgressiveFuture<V>removeListeners in interface Promise<V>ProgressivePromise<V> await() throws InterruptedException
Futureawait in interface ProgressiveFuture<V>await in interface Promise<V>InterruptedException - if the current thread was interruptedProgressivePromise<V> awaitUninterruptibly()
FutureInterruptedException and
discards it silently.awaitUninterruptibly in interface ProgressiveFuture<V>awaitUninterruptibly in interface Promise<V>ProgressivePromise<V> sync() throws InterruptedException
Futuresync in interface ProgressiveFuture<V>sync in interface Promise<V>InterruptedExceptionProgressivePromise<V> syncUninterruptibly()
FuturesyncUninterruptibly in interface ProgressiveFuture<V>syncUninterruptibly in interface Promise<V>Copyright © 2008–2015 The Netty Project. All rights reserved.