Class Predicates2

java.lang.Object
org.jclouds.util.Predicates2

public class Predicates2 extends Object
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final long
     
    static final long
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static <T> com.google.common.base.Predicate<T>
    retry(com.google.common.base.Predicate<T> findOrBreak, long timeout)
    like retry(Predicate, long, long, long, TimeUnit) where unit is in milliseconds, period is 50ms, and maxPeriod 1s.
    static <T> com.google.common.base.Predicate<T>
    retry(com.google.common.base.Predicate<T> findOrBreak, long timeout, long period, long maxPeriod)
    like retry(Predicate, long, long, long, TimeUnit) where unit is in milliseconds
    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.
    static <T> com.google.common.base.Predicate<T>
    retry(com.google.common.base.Predicate<T> findOrBreak, long timeout, long period, TimeUnit unit)
    like retry(Predicate, long, long, long, TimeUnit) where maxPeriod is 10x period
    static com.google.common.base.Predicate<String>
    Returns a predicate that evaluates to true if the String being tested starts with a prefix.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

    • Predicates2

      public Predicates2()
  • Method Details

    • 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)
      like retry(Predicate, long, long, long, TimeUnit) where maxPeriod is 10x period
    • retry

      public static <T> com.google.common.base.Predicate<T> retry(com.google.common.base.Predicate<T> findOrBreak, long timeout, long period, long maxPeriod)
      like retry(Predicate, long, long, long, TimeUnit) where unit is in milliseconds
    • retry

      public static <T> com.google.common.base.Predicate<T> retry(com.google.common.base.Predicate<T> findOrBreak, long timeout)
      like retry(Predicate, long, long, long, TimeUnit) where unit is in milliseconds, period is 50ms, and maxPeriod 1s.