org.jclouds.concurrent
Class FutureIterables
java.lang.Object
org.jclouds.concurrent.FutureIterables
@Beta
public class FutureIterables
- extends Object
functions related to or replacing those in Iterables dealing with Futures
- Author:
- Adrian Cole
|
Method Summary |
static
|
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
|
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
|
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)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FutureIterables
public FutureIterables()
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
Copyright © 2009-2013 jclouds. All Rights Reserved.