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<T,? extends Future<?>> responses,
ExecutorService exec,
Long maxTime,
Logger logger,
String logPrefix)
|
protected static boolean |
timeOut(long start,
Long maxTime)
|
static
|
transformParallel(Iterable<F> fromIterable,
com.google.common.base.Function<? super F,Future<T>> function)
|
static
|
transformParallel(Iterable<F> fromIterable,
com.google.common.base.Function<? super F,Future<T>> function,
ExecutorService exec,
Long maxTime)
|
static
|
transformParallel(Iterable<F> fromIterable,
com.google.common.base.Function<? super F,Future<T>> function,
ExecutorService exec,
Long maxTime,
Logger logger,
String logPrefix)
|
static
|
transformParallel(Iterable<F> fromIterable,
com.google.common.base.Function<? super F,Future<T>> function,
ExecutorService exec,
Long maxTime,
Logger logger,
String logPrefix,
BackoffLimitedRetryHandler retryHandler,
int maxRetries)
|
static
|
unwrap(Iterable<Future<T>> values)
|
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,Future<T>> function)
transformParallel
public static <F,T> Iterable<T> transformParallel(Iterable<F> fromIterable,
com.google.common.base.Function<? super F,Future<T>> function,
ExecutorService exec,
@Nullable
Long maxTime)
transformParallel
public static <F,T> Iterable<T> transformParallel(Iterable<F> fromIterable,
com.google.common.base.Function<? super F,Future<T>> function,
ExecutorService 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,Future<T>> function,
ExecutorService exec,
@Nullable
Long maxTime,
Logger logger,
String logPrefix,
BackoffLimitedRetryHandler retryHandler,
int maxRetries)
awaitCompletion
public static <T> Map<T,Exception> awaitCompletion(Map<T,? extends Future<?>> responses,
ExecutorService exec,
@Nullable
Long maxTime,
Logger logger,
String logPrefix)
unwrap
public static <T> Iterable<T> unwrap(Iterable<Future<T>> values)
timeOut
protected static boolean timeOut(long start,
Long maxTime)
Copyright © 2009-2012 jclouds. All Rights Reserved.