ChannelProgressivePromise implementation. It is recommended to use
Channel#newProgressivePromise() to create a new ChannelProgressivePromise rather than calling the
constructor explicitly.
| Modifier and Type | Field and Description |
|---|---|
| private final Channel | |
| private long |
| Access | Constructor and Description |
|---|---|
| public | DefaultChannelProgressivePromise(Channel
the channel)Channel associated with this futureCreates a new instance. |
| public | DefaultChannelProgressivePromise(Channel
the channel, EventExecutor executor)Channel associated with this futureCreates a new instance. |
| channel | back to summary |
|---|---|
| private final Channel channel | |
| checkpoint | back to summary |
|---|---|
| private long checkpoint | |
| DefaultChannelProgressivePromise | back to summary |
|---|---|
| public DefaultChannelProgressivePromise(Channel channel) Creates a new instance. | |
| DefaultChannelProgressivePromise | back to summary |
|---|---|
| public DefaultChannelProgressivePromise(Channel channel, EventExecutor executor) Creates a new instance. | |
| addListener | back to summary |
|---|---|
| public ChannelProgressivePromise addListener(GenericFutureListener<? extends Future<? super Void>> listener) Overrides io. Implements io. Doc from io. Adds the specified listener to this future. The specified listener is notified when this future is done. If this future is already completed, the specified listener is notified immediately.
| |
| addListeners | back to summary |
|---|---|
| public ChannelProgressivePromise addListeners(GenericFutureListener<? extends Future<? super Void>>... listeners) Overrides io. Implements io. Doc from io. Adds the specified listeners to this future. The specified listeners are notified when this future is done. If this future is already completed, the specified listeners are notified immediately.
| |
| await | back to summary |
|---|---|
| public ChannelProgressivePromise await() throws InterruptedException Overrides io. Implements io. Doc from io. Waits for this future to be completed.
| |
| awaitUninterruptibly | back to summary |
|---|---|
| public ChannelProgressivePromise awaitUninterruptibly() Overrides io. Implements io. Doc from io. Waits for this future to be completed without
interruption. This method catches an
| |
| channel | back to summary |
|---|---|
| public Channel channel() Implements io. Doc from io. Returns a channel where the I/O operation associated with this future takes place.
| |
| checkDeadLock | back to summary |
|---|---|
| protected void checkDeadLock() Overrides io.
| |
| executor | back to summary |
|---|---|
| protected EventExecutor executor() Overrides io. Doc from io. Get the executor used to notify listeners when this promise is complete.
It is assumed this executor will protect against
| |
| flushCheckpoint | back to summary |
|---|---|
| public long flushCheckpoint() Implements io.
| |
| flushCheckpoint | back to summary |
|---|---|
| public void flushCheckpoint(long checkpoint) Implements io.
| |
| isVoid | back to summary |
|---|---|
| public boolean isVoid() Implements io. Doc from io. Returns
| |
| promise | back to summary |
|---|---|
| public ChannelProgressivePromise promise() Implements io.
| |
| removeListener | back to summary |
|---|---|
| public ChannelProgressivePromise removeListener(GenericFutureListener<? extends Future<? super Void>> listener) Overrides io. Implements io. Doc from io. Removes the first occurrence of the specified listener from this future. The specified listener is no longer notified when this future is done. If the specified listener is not associated with this future, this method does nothing and returns silently.
| |
| removeListeners | back to summary |
|---|---|
| public ChannelProgressivePromise removeListeners(GenericFutureListener<? extends Future<? super Void>>... listeners) Overrides io. Implements io. Doc from io. Removes the first occurrence for each of the listeners from this future. The specified listeners are no longer notified when this future is done. If the specified listeners are not associated with this future, this method does nothing and returns silently.
| |
| setFailure | back to summary |
|---|---|
| public ChannelProgressivePromise setFailure(Throwable cause) Overrides io. Implements io. Doc from io. Marks this future as a failure and notifies all
listeners.
If it is success or failed already it will throw an
| |
| setProgress | back to summary |
|---|---|
| public ChannelProgressivePromise setProgress(long progress, long total) Overrides io. Implements io. Doc from io. Sets the current progress of the operation and notifies the listeners that implement
| |
| setSuccess | back to summary |
|---|---|
| public ChannelProgressivePromise setSuccess() Implements io.
| |
| setSuccess | back to summary |
|---|---|
| public ChannelProgressivePromise setSuccess(Void result) Overrides io. Implements io. Doc from io. Marks this future as a success and notifies all
listeners.
If it is success or failed already it will throw an
| |
| sync | back to summary |
|---|---|
| public ChannelProgressivePromise sync() throws InterruptedException Overrides io. Implements io. Doc from io. Waits for this future until it is done, and rethrows the cause of the failure if this future failed.
| |
| syncUninterruptibly | back to summary |
|---|---|
| public ChannelProgressivePromise syncUninterruptibly() Overrides io. Implements io. Doc from io. Waits for this future until it is done, and rethrows the cause of the failure if this future failed.
| |
| trySuccess | back to summary |
|---|---|
| public boolean trySuccess() Implements io.
| |
| unvoid | back to summary |
|---|---|
| public ChannelProgressivePromise unvoid() Implements io. Doc from io. Returns a new
| |