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

java.lang.Object
io.netty.util.concurrent.PromiseAggregator<V,F>
Type Parameters:
V - the type of value returned by the Future
F - the type of Future
All Implemented Interfaces:
GenericFutureListener<F>, java.util.EventListener
Direct Known Subclasses:
ChannelPromiseAggregator

@Deprecated public class PromiseAggregator<V, F extends Future<V>> extends java.lang.Object implements GenericFutureListener<F>
Deprecated.
Use 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 Details

    • aggregatePromise

      private final Promise<?> aggregatePromise
      Deprecated.
    • failPending

      private final boolean failPending
      Deprecated.
    • pendingPromises

      private java.util.Set<Promise<V>> pendingPromises
      Deprecated.
  • Constructor Details

    • PromiseAggregator

      public PromiseAggregator(Promise<java.lang.Void> aggregatePromise, boolean failPending)
      Deprecated.
      Creates a new instance.
      Parameters:
      aggregatePromise - the Promise to notify
      failPending - true to fail pending promises, false to leave them unaffected
    • PromiseAggregator

      public PromiseAggregator(Promise<java.lang.Void> aggregatePromise)
      Deprecated.
      See PromiseAggregator(Promise, boolean). Defaults failPending to true.
  • Method Details

    • add

      @SafeVarargs public final PromiseAggregator<V,F> add(Promise<V>... promises)
      Deprecated.
      Add the given Promises to the aggregator.
    • operationComplete

      public void operationComplete(F future) throws java.lang.Exception
      Deprecated.
      Description copied from interface: GenericFutureListener
      Invoked when the operation associated with the Future has been completed.
      Specified by:
      operationComplete in interface GenericFutureListener<V>
      Parameters:
      future - the source Future which called this callback
      Throws:
      java.lang.Exception