public class DefaultProgressivePromise<V> extends DefaultPromise<V> implements ProgressivePromise<V>
限定符 | 构造器和说明 |
---|---|
protected |
DefaultProgressivePromise() |
|
DefaultProgressivePromise(EventExecutor executor)
Creates a new instance.
|
限定符和类型 | 方法和说明 |
---|---|
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 . |
await, await, awaitUninterruptibly, awaitUninterruptibly, cancel, cause, checkDeadLock, executor, get, get, getNow, isCancellable, isCancelled, isDone, isSuccess, notifyListener, setUncancellable, toString, toStringBuilder, tryFailure, trySuccess
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
setUncancellable, tryFailure, trySuccess
await, await, awaitUninterruptibly, awaitUninterruptibly, cancel, cause, getNow, isCancellable, isSuccess
public DefaultProgressivePromise(EventExecutor executor)
EventExecutor.newProgressivePromise()
to create a new progressive promiseexecutor
- the EventExecutor
which is used to notify the promise when it progresses or it is completeprotected DefaultProgressivePromise()
public ProgressivePromise<V> setProgress(long progress, long total)
ProgressivePromise
GenericProgressiveFutureListener
.setProgress
在接口中 ProgressivePromise<V>
public boolean tryProgress(long progress, long total)
ProgressivePromise
GenericProgressiveFutureListener
. If the operation is already complete or the progress is out of range,
this method does nothing but returning false
.tryProgress
在接口中 ProgressivePromise<V>
public ProgressivePromise<V> addListener(GenericFutureListener<? extends Future<? super V>> listener)
Future
addListener
在接口中 ProgressiveFuture<V>
addListener
在接口中 ProgressivePromise<V>
addListener
在接口中 Promise<V>
addListener
在类中 DefaultPromise<V>
public ProgressivePromise<V> addListeners(GenericFutureListener<? extends Future<? super V>>... listeners)
Future
addListeners
在接口中 ProgressiveFuture<V>
addListeners
在接口中 ProgressivePromise<V>
addListeners
在接口中 Promise<V>
addListeners
在类中 DefaultPromise<V>
public ProgressivePromise<V> removeListener(GenericFutureListener<? extends Future<? super V>> listener)
Future
removeListener
在接口中 ProgressiveFuture<V>
removeListener
在接口中 ProgressivePromise<V>
removeListener
在接口中 Promise<V>
removeListener
在类中 DefaultPromise<V>
public ProgressivePromise<V> removeListeners(GenericFutureListener<? extends Future<? super V>>... listeners)
Future
removeListeners
在接口中 ProgressiveFuture<V>
removeListeners
在接口中 ProgressivePromise<V>
removeListeners
在接口中 Promise<V>
removeListeners
在类中 DefaultPromise<V>
public ProgressivePromise<V> sync() throws java.lang.InterruptedException
Future
sync
在接口中 ProgressiveFuture<V>
sync
在接口中 ProgressivePromise<V>
sync
在接口中 Promise<V>
sync
在类中 DefaultPromise<V>
java.lang.InterruptedException
public ProgressivePromise<V> syncUninterruptibly()
Future
syncUninterruptibly
在接口中 ProgressiveFuture<V>
syncUninterruptibly
在接口中 ProgressivePromise<V>
syncUninterruptibly
在接口中 Promise<V>
syncUninterruptibly
在类中 DefaultPromise<V>
public ProgressivePromise<V> await() throws java.lang.InterruptedException
Future
await
在接口中 ProgressiveFuture<V>
await
在接口中 ProgressivePromise<V>
await
在接口中 Promise<V>
await
在类中 DefaultPromise<V>
java.lang.InterruptedException
- if the current thread was interruptedpublic ProgressivePromise<V> awaitUninterruptibly()
Future
InterruptedException
and
discards it silently.awaitUninterruptibly
在接口中 ProgressiveFuture<V>
awaitUninterruptibly
在接口中 ProgressivePromise<V>
awaitUninterruptibly
在接口中 Promise<V>
awaitUninterruptibly
在类中 DefaultPromise<V>
public ProgressivePromise<V> setSuccess(V result)
Promise
IllegalStateException
.setSuccess
在接口中 ProgressivePromise<V>
setSuccess
在接口中 Promise<V>
setSuccess
在类中 DefaultPromise<V>
public ProgressivePromise<V> setFailure(java.lang.Throwable cause)
Promise
IllegalStateException
.setFailure
在接口中 ProgressivePromise<V>
setFailure
在接口中 Promise<V>
setFailure
在类中 DefaultPromise<V>