Class DelayStrategy$


  • public class DelayStrategy$
    extends java.lang.Object
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static DelayStrategy$ MODULE$
      Static reference to the singleton instance of this Scala object.
    • Constructor Summary

      Constructors 
      Constructor Description
      DelayStrategy$()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      <T> java.lang.Object asScala​(DelayStrategy<T> delayStrategy)
      INTERNAL API
      <T> DelayStrategy<T> fixedDelay​(java.time.Duration delay)
      Fixed delay strategy, always returns constant delay for any element.
      <T> DelayStrategy<T> linearIncreasingDelay​(java.time.Duration increaseStep, scala.Function1<T,​java.lang.Object> needsIncrease)
      Strategy with linear increasing delay.
      <T> DelayStrategy<T> linearIncreasingDelay​(java.time.Duration increaseStep, scala.Function1<T,​java.lang.Object> needsIncrease, java.time.Duration initialDelay)
      Strategy with linear increasing delay.
      <T> DelayStrategy<T> linearIncreasingDelay​(java.time.Duration increaseStep, scala.Function1<T,​java.lang.Object> needsIncrease, java.time.Duration initialDelay, java.time.Duration maxDelay)
      Strategy with linear increasing delay.
      • Methods inherited from class java.lang.Object

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

      • MODULE$

        public static final DelayStrategy$ MODULE$
        Static reference to the singleton instance of this Scala object.
    • Constructor Detail

      • DelayStrategy$

        public DelayStrategy$()
    • Method Detail

      • asScala

        public <T> java.lang.Object asScala​(DelayStrategy<T> delayStrategy)
        INTERNAL API
      • fixedDelay

        public <T> DelayStrategy<T> fixedDelay​(java.time.Duration delay)
        Fixed delay strategy, always returns constant delay for any element.
        Parameters:
        delay - value of the delay
        Returns:
        (undocumented)
      • linearIncreasingDelay

        public <T> DelayStrategy<T> linearIncreasingDelay​(java.time.Duration increaseStep,
                                                          scala.Function1<T,​java.lang.Object> needsIncrease)
        Strategy with linear increasing delay. It starts with zero delay for each element, increases by increaseStep every time when needsIncrease returns true, when needsIncrease returns false it resets to initialDelay.
        Parameters:
        increaseStep - step by which delay is increased
        needsIncrease - if true delay increases, if false delay resets to initialDelay
        Returns:
        (undocumented)
      • linearIncreasingDelay

        public <T> DelayStrategy<T> linearIncreasingDelay​(java.time.Duration increaseStep,
                                                          scala.Function1<T,​java.lang.Object> needsIncrease,
                                                          java.time.Duration initialDelay)
        Strategy with linear increasing delay. It starts with initialDelay for each element, increases by increaseStep every time when needsIncrease returns true. when needsIncrease returns false it resets to initialDelay.
        Parameters:
        increaseStep - step by which delay is increased
        needsIncrease - if true delay increases, if false delay resets to initialDelay
        initialDelay - initial delay for each of elements
        Returns:
        (undocumented)
      • linearIncreasingDelay

        public <T> DelayStrategy<T> linearIncreasingDelay​(java.time.Duration increaseStep,
                                                          scala.Function1<T,​java.lang.Object> needsIncrease,
                                                          java.time.Duration initialDelay,
                                                          java.time.Duration maxDelay)
        Strategy with linear increasing delay. It starts with initialDelay for each element, increases by increaseStep every time when needsIncrease returns true up to maxDelay, when needsIncrease returns false it resets to initialDelay.
        Parameters:
        increaseStep - step by which delay is increased
        needsIncrease - if true delay increases, if false delay resets to initialDelay
        initialDelay - initial delay for each of elements
        maxDelay - limits maximum delay
        Returns:
        (undocumented)