| Modifier and Type | Method and Description |
|---|---|
AsyncDependencies |
addStep(AsyncStep<?> asyncStep)
Adds the future of an
AsyncStep. |
AsyncDependencies |
addSteps(List<? extends AsyncStep<?>> asyncSteps)
Adds the futures of a list of
AsyncSteps. |
static AsyncDependencies |
using(com.google.common.util.concurrent.ListeningExecutorService listeningExecutorService)
Initialize with a
ListeningExecutorService. |
<C> com.google.common.util.concurrent.ListenableFuture<C> |
whenAllSucceed(Callable<C> combiner)
Creates the
ListenableFuture which will return the result of calling combiner
when all the added futures succeed. |
public static AsyncDependencies using(com.google.common.util.concurrent.ListeningExecutorService listeningExecutorService)
ListeningExecutorService.listeningExecutorService - the ListeningExecutorServiceAsyncDependenciespublic AsyncDependencies addStep(AsyncStep<?> asyncStep)
AsyncStep.asyncStep - the AsyncSteppublic AsyncDependencies addSteps(List<? extends AsyncStep<?>> asyncSteps)
AsyncSteps.asyncSteps - the AsyncStepspublic <C> com.google.common.util.concurrent.ListenableFuture<C> whenAllSucceed(Callable<C> combiner)
ListenableFuture which will return the result of calling combiner
when all the added futures succeed.C - the return type of combinercombiner - the CallableListenableFuture to handle completion of the call to combinerCopyright © 2019. All rights reserved.