Class DefaultCollectingAsyncFuture<V>

java.lang.Object
java.util.concurrent.CompletableFuture<T>
com.linkedin.alpini.base.concurrency.impl.DefaultAsyncFuture<List<V>>
com.linkedin.alpini.base.concurrency.impl.DefaultCollectingAsyncFuture<V>
All Implemented Interfaces:
AsyncFuture<List<V>>, AsyncPromise<List<V>>, Time.Awaitable, CompletionStage<List<V>>, Future<List<V>>

public class DefaultCollectingAsyncFuture<V> extends DefaultAsyncFuture<List<V>>
A specialised instance of @{link AsyncFuture} for collecting the results of one or more futures of lists into a single list.
  • Constructor Details

    • DefaultCollectingAsyncFuture

      public DefaultCollectingAsyncFuture(@Nonnull List<AsyncFuture<List<V>>> futuresList, boolean cancellable)
      Creates a new instance.
      Parameters:
      futuresList - List of @{AsyncFuture}s to be collated.
      cancellable - true if and only if this future can be canceled
    • DefaultCollectingAsyncFuture

      public DefaultCollectingAsyncFuture(@Nonnull List<AsyncFuture<List<V>>> futuresList, boolean cancellable, @Nonnull Function<List<V>,List<V>> filter)
      Creates a new instance.
      Parameters:
      futuresList - List of @{AsyncFuture}s to be collated.
      cancellable - true if and only if this future can be canceled
      filter - a Function to filter the completing futures.