static final class Http2CodecUtil.SimpleChannelPromiseAggregator extends DefaultChannelPromise
ChannelPromise
objects into a single ChannelPromise object.| Modifier and Type | Field and Description |
|---|---|
private boolean |
doneAllocating |
private int |
doneCount |
private int |
expectedCount |
private java.lang.Throwable |
lastFailure |
private ChannelPromise |
promise |
| Constructor and Description |
|---|
SimpleChannelPromiseAggregator(ChannelPromise promise,
Channel c,
EventExecutor e) |
| Modifier and Type | Method and Description |
|---|---|
private boolean |
allowFailure() |
private boolean |
allPromisesDone() |
private boolean |
awaitingPromises() |
ChannelPromise |
doneAllocatingPromises()
Signify that no more
newPromise() allocations will be made. |
ChannelPromise |
newPromise()
Allocate a new promise which will be used to aggregate the overall success of this promise aggregator.
|
ChannelPromise |
setFailure(java.lang.Throwable cause)
Fail this object if it has not already been failed.
|
private ChannelPromise |
setPromise() |
ChannelPromise |
setSuccess(java.lang.Void result)
Marks this future as a success and notifies all
listeners.
|
boolean |
tryFailure(java.lang.Throwable cause)
Marks this future as a failure and notifies all
listeners.
|
private boolean |
tryPromise() |
boolean |
trySuccess(java.lang.Void result)
Marks this future as a success and notifies all
listeners.
|
addListener, addListeners, await, awaitUninterruptibly, channel, checkDeadLock, executor, flushCheckpoint, flushCheckpoint, isVoid, promise, removeListener, removeListeners, setSuccess, sync, syncUninterruptibly, trySuccess, unvoidawait, await, awaitUninterruptibly, awaitUninterruptibly, cancel, cause, getNow, isCancellable, isCancelled, isDone, isSuccess, notifyListener, setUncancellable, toString, toStringBuilderget, getclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitsetUncancellableawait, await, awaitUninterruptibly, awaitUninterruptibly, cancel, cause, getNow, isCancellable, isSuccessprivate final ChannelPromise promise
private int expectedCount
private int doneCount
private java.lang.Throwable lastFailure
private boolean doneAllocating
SimpleChannelPromiseAggregator(ChannelPromise promise, Channel c, EventExecutor e)
public ChannelPromise newPromise()
null if doneAllocatingPromises() was previously called.public ChannelPromise doneAllocatingPromises()
newPromise() allocations will be made.
The aggregation can not be successful until this method is called.newPromise().public boolean tryFailure(java.lang.Throwable cause)
PromisetryFailure in interface Promise<java.lang.Void>tryFailure in class DefaultPromise<java.lang.Void>true if and only if successfully marked this future as
a failure. Otherwise false because this future is
already marked as either a success or a failure.public ChannelPromise setFailure(java.lang.Throwable cause)
This method will NOT throw an IllegalStateException if called multiple times
because that may be expected.
setFailure in interface ChannelPromisesetFailure in interface Promise<java.lang.Void>setFailure in class DefaultChannelPromisepublic ChannelPromise setSuccess(java.lang.Void result)
PromiseIllegalStateException.setSuccess in interface ChannelPromisesetSuccess in interface Promise<java.lang.Void>setSuccess in class DefaultChannelPromisepublic boolean trySuccess(java.lang.Void result)
PromisetrySuccess in interface Promise<java.lang.Void>trySuccess in class DefaultPromise<java.lang.Void>true if and only if successfully marked this future as
a success. Otherwise false because this future is
already marked as either a success or a failure.private boolean allowFailure()
private boolean awaitingPromises()
private boolean allPromisesDone()
private ChannelPromise setPromise()
private boolean tryPromise()