Top Fields Constructors Methods
io.netty.util.concurrent

public Class PromiseAggregator<V, F extends Future<V>>

extends Object
implements GenericFutureListener<F extends Future<V>>
Class Inheritance
All Implemented Interfaces
io.netty.util.concurrent.GenericFutureListener, java.util.EventListener
Annotations
@Deprecated
Type Parameters
<V>
the type of value returned by the Future
<F>
the type of Future
Imports
io.netty.util.internal.ObjectUtil, java.util.LinkedHashSet, .Set

Deprecated

Use PromiseCombiner#PromiseCombiner(EventExecutor). GenericFutureListener implementation which consolidates multiple Futures into one, by listening to individual Futures and producing an aggregated result (success/failure) when all Futures have completed.

Field Summary

Modifier and TypeField and Description
private final Promise<?>
private final boolean
private Set<Promise<V>>

Constructor Summary

AccessConstructor and Description
public
PromiseAggregator(Promise<Void>
the Promise to notify
aggregatePromise
,
boolean
true to fail pending promises, false to leave them unaffected
failPending
)

Creates a new instance.

public

Method Summary

Modifier and TypeMethod and Description
public final PromiseAggregator<V, F>
add(Promise<V>... promises)

Deprecated as a consequence of PromiseAggregator being deprecated.
Add the given Promises to the aggregator.
public synchronized void
operationComplete(F
the source Future which called this callback
future
)

Implements io.netty.util.concurrent.GenericFutureListener.operationComplete.

Invoked when the operation associated with the Future has been completed.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

aggregatePromiseback to summary
private final Promise<?> aggregatePromise
failPendingback to summary
private final boolean failPending
pendingPromisesback to summary
private Set<Promise<V>> pendingPromises

Constructor Detail

PromiseAggregatorback to summary
public PromiseAggregator(Promise<Void> aggregatePromise, boolean failPending)

Creates a new instance.

Parameters
aggregatePromise:Promise<Void>

the Promise to notify

failPending:boolean

true to fail pending promises, false to leave them unaffected

PromiseAggregatorback to summary
public PromiseAggregator(Promise<Void> aggregatePromise)

See PromiseAggregator#PromiseAggregator(Promise, boolean). Defaults failPending to true.

Method Detail

addback to summary
public final PromiseAggregator<V, F> add(Promise<V>... promises)

Deprecated

as a consequence of PromiseAggregator being deprecated. See corresponding docs for further information.

Add the given Promises to the aggregator.

Annotations
@SafeVarargs
operationCompleteback to summary
public synchronized void operationComplete(F future) throws Exception

Implements io.netty.util.concurrent.GenericFutureListener.operationComplete.

Doc from io.netty.util.concurrent.GenericFutureListener.operationComplete.

Invoked when the operation associated with the Future has been completed.

Parameters
future:F

the source Future which called this callback

Annotations
@Override