PromiseCombiner
GenericFutureListener
implementation which consolidates multiple Future
s
into one, by listening to individual Future
s and producing an aggregated result
(success/failure) when all Future
s have completed.@Deprecated public class PromiseAggregator<V,F extends Future<V>> extends java.lang.Object implements GenericFutureListener<F>
Constructor and Description |
---|
PromiseAggregator(Promise<java.lang.Void> aggregatePromise)
Deprecated.
|
PromiseAggregator(Promise<java.lang.Void> aggregatePromise,
boolean failPending)
Deprecated.
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
PromiseAggregator<V,F> |
add(Promise<V>... promises)
Deprecated.
Add the given
Promise s to the aggregator. |
void |
operationComplete(F future)
Deprecated.
Invoked when the operation associated with the
Future has been completed. |
public PromiseAggregator(Promise<java.lang.Void> aggregatePromise, boolean failPending)
aggregatePromise
- the Promise
to notifyfailPending
- true
to fail pending promises, false to leave them unaffectedpublic PromiseAggregator(Promise<java.lang.Void> aggregatePromise)
PromiseAggregator(Promise, boolean)
.
Defaults failPending
to true.@SafeVarargs public final PromiseAggregator<V,F> add(Promise<V>... promises)
Promise
s to the aggregator.public void operationComplete(F future) throws java.lang.Exception
GenericFutureListener
Future
has been completed.operationComplete
in interface GenericFutureListener<F extends Future<V>>
future
- the source Future
which called this callbackjava.lang.Exception
Copyright © 2008–2018 The Netty Project. All rights reserved.