public class DefaultChannelProgressivePromise extends DefaultProgressivePromise<java.lang.Void> implements ChannelProgressivePromise
ChannelProgressivePromise
implementation. It is recommended to use
ChannelOutboundInvoker.newProgressivePromise()
to create a new ChannelProgressivePromise
rather than calling the
constructor explicitly.构造器和说明 |
---|
DefaultChannelProgressivePromise(Channel channel)
Creates a new instance.
|
DefaultChannelProgressivePromise(Channel channel,
EventExecutor executor)
Creates a new instance.
|
限定符和类型 | 方法和说明 |
---|---|
ChannelProgressivePromise |
addListener(GenericFutureListener<? extends Future<? super java.lang.Void>> listener)
Adds the specified listener to this future.
|
ChannelProgressivePromise |
addListeners(GenericFutureListener<? extends Future<? super java.lang.Void>>... listeners)
Adds the specified listeners to this future.
|
ChannelProgressivePromise |
await()
Waits for this future to be completed.
|
ChannelProgressivePromise |
awaitUninterruptibly()
Waits for this future to be completed without
interruption.
|
Channel |
channel()
Returns a channel where the I/O operation associated with this
future takes place.
|
protected void |
checkDeadLock() |
protected EventExecutor |
executor()
Get the executor used to notify listeners when this promise is complete.
|
long |
flushCheckpoint() |
void |
flushCheckpoint(long checkpoint) |
boolean |
isVoid()
Returns
true if this ChannelFuture is a void future and so not allow to call any of the
following methods:
ChannelFuture.addListener(GenericFutureListener)
ChannelFuture.addListeners(GenericFutureListener[])
ChannelFuture.await()
Future.await(long, TimeUnit) ()}
Future.await(long) ()}
ChannelFuture.awaitUninterruptibly()
ChannelFuture.sync()
ChannelFuture.syncUninterruptibly()
|
ChannelProgressivePromise |
promise() |
ChannelProgressivePromise |
removeListener(GenericFutureListener<? extends Future<? super java.lang.Void>> listener)
Removes the first occurrence of the specified listener from this future.
|
ChannelProgressivePromise |
removeListeners(GenericFutureListener<? extends Future<? super java.lang.Void>>... listeners)
Removes the first occurrence for each of the listeners from this future.
|
ChannelProgressivePromise |
setFailure(java.lang.Throwable cause)
Marks this future as a failure and notifies all
listeners.
|
ChannelProgressivePromise |
setProgress(long progress,
long total)
Sets the current progress of the operation and notifies the listeners that implement
GenericProgressiveFutureListener . |
ChannelProgressivePromise |
setSuccess() |
ChannelProgressivePromise |
setSuccess(java.lang.Void result)
Marks this future as a success and notifies all
listeners.
|
ChannelProgressivePromise |
sync()
Waits for this future until it is done, and rethrows the cause of the failure if this future
failed.
|
ChannelProgressivePromise |
syncUninterruptibly()
Waits for this future until it is done, and rethrows the cause of the failure if this future
failed.
|
boolean |
trySuccess() |
ChannelProgressivePromise |
unvoid()
|
tryProgress
await, await, awaitUninterruptibly, awaitUninterruptibly, cancel, cause, get, get, getNow, isCancellable, isCancelled, isDone, isSuccess, notifyListener, setUncancellable, toString, toStringBuilder, tryFailure, trySuccess
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
tryProgress
setUncancellable, tryFailure, trySuccess
await, await, awaitUninterruptibly, awaitUninterruptibly, cancel, cause, getNow, isCancellable, isSuccess
public DefaultChannelProgressivePromise(Channel channel)
channel
- the Channel
associated with this futurepublic DefaultChannelProgressivePromise(Channel channel, EventExecutor executor)
channel
- the Channel
associated with this futureprotected EventExecutor executor()
DefaultPromise
It is assumed this executor will protect against StackOverflowError
exceptions.
The executor may be used to avoid StackOverflowError
by executing a Runnable
if the stack
depth exceeds a threshold.
executor
在类中 DefaultPromise<java.lang.Void>
public Channel channel()
ChannelFuture
channel
在接口中 ChannelFuture
channel
在接口中 ChannelPromise
public ChannelProgressivePromise setSuccess()
setSuccess
在接口中 ChannelProgressivePromise
setSuccess
在接口中 ChannelPromise
public ChannelProgressivePromise setSuccess(java.lang.Void result)
Promise
IllegalStateException
.setSuccess
在接口中 ChannelProgressivePromise
setSuccess
在接口中 ChannelPromise
setSuccess
在接口中 ProgressivePromise<java.lang.Void>
setSuccess
在接口中 Promise<java.lang.Void>
setSuccess
在类中 DefaultProgressivePromise<java.lang.Void>
public boolean trySuccess()
trySuccess
在接口中 ChannelPromise
public ChannelProgressivePromise setFailure(java.lang.Throwable cause)
Promise
IllegalStateException
.setFailure
在接口中 ChannelProgressivePromise
setFailure
在接口中 ChannelPromise
setFailure
在接口中 ProgressivePromise<java.lang.Void>
setFailure
在接口中 Promise<java.lang.Void>
setFailure
在类中 DefaultProgressivePromise<java.lang.Void>
public ChannelProgressivePromise setProgress(long progress, long total)
ProgressivePromise
GenericProgressiveFutureListener
.setProgress
在接口中 ChannelProgressivePromise
setProgress
在接口中 ProgressivePromise<java.lang.Void>
setProgress
在类中 DefaultProgressivePromise<java.lang.Void>
public ChannelProgressivePromise addListener(GenericFutureListener<? extends Future<? super java.lang.Void>> listener)
Future
addListener
在接口中 ChannelFuture
addListener
在接口中 ChannelProgressiveFuture
addListener
在接口中 ChannelProgressivePromise
addListener
在接口中 ChannelPromise
addListener
在接口中 ProgressiveFuture<java.lang.Void>
addListener
在接口中 ProgressivePromise<java.lang.Void>
addListener
在接口中 Promise<java.lang.Void>
addListener
在类中 DefaultProgressivePromise<java.lang.Void>
public ChannelProgressivePromise addListeners(GenericFutureListener<? extends Future<? super java.lang.Void>>... listeners)
Future
addListeners
在接口中 ChannelFuture
addListeners
在接口中 ChannelProgressiveFuture
addListeners
在接口中 ChannelProgressivePromise
addListeners
在接口中 ChannelPromise
addListeners
在接口中 ProgressiveFuture<java.lang.Void>
addListeners
在接口中 ProgressivePromise<java.lang.Void>
addListeners
在接口中 Promise<java.lang.Void>
addListeners
在类中 DefaultProgressivePromise<java.lang.Void>
public ChannelProgressivePromise removeListener(GenericFutureListener<? extends Future<? super java.lang.Void>> listener)
Future
removeListener
在接口中 ChannelFuture
removeListener
在接口中 ChannelProgressiveFuture
removeListener
在接口中 ChannelProgressivePromise
removeListener
在接口中 ChannelPromise
removeListener
在接口中 ProgressiveFuture<java.lang.Void>
removeListener
在接口中 ProgressivePromise<java.lang.Void>
removeListener
在接口中 Promise<java.lang.Void>
removeListener
在类中 DefaultProgressivePromise<java.lang.Void>
public ChannelProgressivePromise removeListeners(GenericFutureListener<? extends Future<? super java.lang.Void>>... listeners)
Future
removeListeners
在接口中 ChannelFuture
removeListeners
在接口中 ChannelProgressiveFuture
removeListeners
在接口中 ChannelProgressivePromise
removeListeners
在接口中 ChannelPromise
removeListeners
在接口中 ProgressiveFuture<java.lang.Void>
removeListeners
在接口中 ProgressivePromise<java.lang.Void>
removeListeners
在接口中 Promise<java.lang.Void>
removeListeners
在类中 DefaultProgressivePromise<java.lang.Void>
public ChannelProgressivePromise sync() throws java.lang.InterruptedException
Future
sync
在接口中 ChannelFuture
sync
在接口中 ChannelProgressiveFuture
sync
在接口中 ChannelProgressivePromise
sync
在接口中 ChannelPromise
sync
在接口中 ProgressiveFuture<java.lang.Void>
sync
在接口中 ProgressivePromise<java.lang.Void>
sync
在接口中 Promise<java.lang.Void>
sync
在类中 DefaultProgressivePromise<java.lang.Void>
java.lang.InterruptedException
public ChannelProgressivePromise syncUninterruptibly()
Future
syncUninterruptibly
在接口中 ChannelFuture
syncUninterruptibly
在接口中 ChannelProgressiveFuture
syncUninterruptibly
在接口中 ChannelProgressivePromise
syncUninterruptibly
在接口中 ChannelPromise
syncUninterruptibly
在接口中 ProgressiveFuture<java.lang.Void>
syncUninterruptibly
在接口中 ProgressivePromise<java.lang.Void>
syncUninterruptibly
在接口中 Promise<java.lang.Void>
syncUninterruptibly
在类中 DefaultProgressivePromise<java.lang.Void>
public ChannelProgressivePromise await() throws java.lang.InterruptedException
Future
await
在接口中 ChannelFuture
await
在接口中 ChannelProgressiveFuture
await
在接口中 ChannelProgressivePromise
await
在接口中 ChannelPromise
await
在接口中 ProgressiveFuture<java.lang.Void>
await
在接口中 ProgressivePromise<java.lang.Void>
await
在接口中 Promise<java.lang.Void>
await
在类中 DefaultProgressivePromise<java.lang.Void>
java.lang.InterruptedException
- if the current thread was interruptedpublic ChannelProgressivePromise awaitUninterruptibly()
Future
InterruptedException
and
discards it silently.awaitUninterruptibly
在接口中 ChannelFuture
awaitUninterruptibly
在接口中 ChannelProgressiveFuture
awaitUninterruptibly
在接口中 ChannelProgressivePromise
awaitUninterruptibly
在接口中 ChannelPromise
awaitUninterruptibly
在接口中 ProgressiveFuture<java.lang.Void>
awaitUninterruptibly
在接口中 ProgressivePromise<java.lang.Void>
awaitUninterruptibly
在接口中 Promise<java.lang.Void>
awaitUninterruptibly
在类中 DefaultProgressivePromise<java.lang.Void>
public long flushCheckpoint()
public void flushCheckpoint(long checkpoint)
public ChannelProgressivePromise promise()
protected void checkDeadLock()
checkDeadLock
在类中 DefaultPromise<java.lang.Void>
public ChannelProgressivePromise unvoid()
ChannelPromise
unvoid
在接口中 ChannelProgressivePromise
unvoid
在接口中 ChannelPromise
public boolean isVoid()
ChannelFuture
true
if this ChannelFuture
is a void future and so not allow to call any of the
following methods:
isVoid
在接口中 ChannelFuture