Class CompositeIoFuture<E extends IoFuture>

java.lang.Object
org.apache.mina.core.future.DefaultIoFuture
org.apache.mina.core.future.CompositeIoFuture<E>
Type Parameters:
E - the type of the child futures.
All Implemented Interfaces:
IoFuture

public class CompositeIoFuture<E extends IoFuture> extends DefaultIoFuture
An IoFuture of IoFutures. It is useful when you want to get notified when all IoFutures are complete. It is not recommended to use CompositeIoFuture if you just want to wait for all futures. In that case, please use IoUtil.await(Iterable) instead for better performance.
  • Field Details

    • listener

      private final CompositeIoFuture<E extends IoFuture>.NotifyingListener listener
      A listener
    • unnotified

      private final AtomicInteger unnotified
      A thread safe counter that is used to keep a track of the notified futures
    • constructionFinished

      private volatile boolean constructionFinished
      A flag set to TRUE when all the future have been added to the list
  • Constructor Details

    • CompositeIoFuture

      public CompositeIoFuture(Iterable<E> children)
      Creates a new CompositeIoFuture instance
      Parameters:
      children - The list of internal futures