Package org.jclouds.concurrent
Class FutureIterables
- java.lang.Object
-
- org.jclouds.concurrent.FutureIterables
-
@Beta public class FutureIterables extends Object
functions related to or replacing those inIterables
dealing with Futures
-
-
Constructor Summary
Constructors Constructor Description FutureIterables()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <F> Map<F,Exception>
awaitCompletion(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)
-
-
-
Method Detail
-
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
-
-