Package org.jclouds.util
Class Predicates2
java.lang.Object
org.jclouds.util.Predicates2
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final longstatic final long -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <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> 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.
-
Field Details
-
DEFAULT_PERIOD
public static final long DEFAULT_PERIOD- See Also:
-
DEFAULT_MAX_PERIOD
public static final long DEFAULT_MAX_PERIOD- See Also:
-
-
Constructor Details
-
Predicates2
public Predicates2()
-
-
Method Details
-
startsWith
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.
-