Package org.jclouds.concurrent
Class FutureIterables
java.lang.Object
org.jclouds.concurrent.FutureIterables
functions related to or replacing those in
Iterables
dealing with Futures-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionawaitCompletion
(Map<F, ? extends com.google.common.util.concurrent.ListenableFuture<?>> responses, com.google.common.util.concurrent.ListeningExecutorService exec, Long maxTime, Logger logger, String logPrefix) static <F,
T> Iterable <T> transformParallel
(Iterable<F> fromIterable, com.google.common.base.Function<? super F, com.google.common.util.concurrent.ListenableFuture<? extends T>> function, com.google.common.util.concurrent.ListeningExecutorService exec, Long maxTime, Logger logger, String logPrefix) static <F,
T> Iterable <T> transformParallel
(Iterable<F> fromIterable, com.google.common.base.Function<? super F, com.google.common.util.concurrent.ListenableFuture<? extends T>> function, com.google.common.util.concurrent.ListeningExecutorService exec, Long maxTime, Logger logger, String logPrefix, BackoffLimitedRetryHandler retryHandler, int maxRetries)
-
Constructor Details
-
FutureIterables
public FutureIterables()
-
-
Method Details
-
transformParallel
public static <F,T> Iterable<T> transformParallel(Iterable<F> fromIterable, com.google.common.base.Function<? super F, com.google.common.util.concurrent.ListenableFuture<? extends T>> function, com.google.common.util.concurrent.ListeningExecutorService exec, @Nullable Long maxTime, Logger logger, String logPrefix) -
transformParallel
public static <F,T> Iterable<T> transformParallel(Iterable<F> fromIterable, com.google.common.base.Function<? super F, com.google.common.util.concurrent.ListenableFuture<? extends T>> function, com.google.common.util.concurrent.ListeningExecutorService exec, @Nullable Long maxTime, Logger logger, String logPrefix, BackoffLimitedRetryHandler retryHandler, int maxRetries) -
awaitCompletion
public static <F> Map<F,Exception> awaitCompletion(Map<F, ? extends com.google.common.util.concurrent.ListenableFuture<?>> responses, com.google.common.util.concurrent.ListeningExecutorService exec, @Nullable Long maxTime, Logger logger, String logPrefix) throws TimeoutException- Throws:
TimeoutException
-