Package org.jclouds.util
Class Predicates2
- java.lang.Object
-
- org.jclouds.util.Predicates2
-
public class Predicates2 extends Object
-
-
Field Summary
Fields Modifier and Type Field Description static longDEFAULT_MAX_PERIODstatic longDEFAULT_PERIOD
-
Constructor Summary
Constructors Constructor Description Predicates2()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T> com.google.common.base.Predicate<T>retry(com.google.common.base.Predicate<T> findOrBreak, long timeout)likeretry(Predicate, long, long, long, TimeUnit)whereunitis in milliseconds,periodis 50ms, andmaxPeriod1s.static <T> com.google.common.base.Predicate<T>retry(com.google.common.base.Predicate<T> findOrBreak, long timeout, long period, long maxPeriod)likeretry(Predicate, long, long, long, TimeUnit)whereunitis in millisecondsstatic <T> com.google.common.base.Predicate<T>retry(com.google.common.base.Predicate<T> findOrBreak, long timeout, long period, long maxPeriod, TimeUnit unit)Retries a predicate until it is met, a timeout occurs, or an exception occurs.static <T> com.google.common.base.Predicate<T>retry(com.google.common.base.Predicate<T> findOrBreak, long timeout, long period, TimeUnit unit)static com.google.common.base.Predicate<String>startsWith(String prefix)Returns a predicate that evaluates to true if the String being tested starts with a prefix.
-
-
-
Method Detail
-
startsWith
public static com.google.common.base.Predicate<String> startsWith(String prefix)
Returns a predicate that evaluates to true if the String being tested starts with a prefix.
-
retry
public static <T> com.google.common.base.Predicate<T> retry(com.google.common.base.Predicate<T> findOrBreak, long timeout, long period, long maxPeriod, TimeUnit unit)Retries a predicate until it is met, a timeout occurs, or an exception occurs.
-
retry
public static <T> com.google.common.base.Predicate<T> retry(com.google.common.base.Predicate<T> findOrBreak, long timeout, long period, TimeUnit unit)
-
retry
public static <T> com.google.common.base.Predicate<T> retry(com.google.common.base.Predicate<T> findOrBreak, long timeout, long period, long maxPeriod)likeretry(Predicate, long, long, long, TimeUnit)whereunitis in milliseconds
-
retry
public static <T> com.google.common.base.Predicate<T> retry(com.google.common.base.Predicate<T> findOrBreak, long timeout)likeretry(Predicate, long, long, long, TimeUnit)whereunitis in milliseconds,periodis 50ms, andmaxPeriod1s.
-
-