org.jclouds.predicates
Class Retryables
java.lang.Object
org.jclouds.predicates.Retryables
@Beta
public class Retryables
- extends Object
convenience methods to retry application of a predicate, and optionally (reducing quite a bit of boilerplate)
get the final result or throw assertion error
- Author:
- alex heneveld
Method Summary |
static
|
assertEventually(com.google.common.base.Predicate<Input> predicate,
Input input,
long maxWaitMillis,
String failureMessage)
|
static
|
retry(com.google.common.base.Predicate<Input> predicate,
Input input,
long maxWaitMillis)
|
static
|
retry(com.google.common.base.Predicate<Input> predicate,
Input input,
long maxWait,
long period,
TimeUnit unit)
|
static
|
retryGettingResultOrFailing(PredicateWithResult<Input,Result> predicate,
Input input,
long maxWait,
long period,
TimeUnit unit,
String failureMessage)
|
static
|
retryGettingResultOrFailing(PredicateWithResult<Input,Result> predicate,
Input input,
long maxWaitMillis,
String failureMessage)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Retryables
public Retryables()
retry
public static <Input> boolean retry(com.google.common.base.Predicate<Input> predicate,
Input input,
long maxWaitMillis)
retry
public static <Input> boolean retry(com.google.common.base.Predicate<Input> predicate,
Input input,
long maxWait,
long period,
TimeUnit unit)
assertEventually
public static <Input> void assertEventually(com.google.common.base.Predicate<Input> predicate,
Input input,
long maxWaitMillis,
String failureMessage)
retryGettingResultOrFailing
public static <Input,Result> Result retryGettingResultOrFailing(PredicateWithResult<Input,Result> predicate,
Input input,
long maxWaitMillis,
String failureMessage)
retryGettingResultOrFailing
public static <Input,Result> Result retryGettingResultOrFailing(PredicateWithResult<Input,Result> predicate,
Input input,
long maxWait,
long period,
TimeUnit unit,
String failureMessage)
Copyright © 2009-2012 jclouds. All Rights Reserved.