Package akka.stream.javadsl
Class DelayStrategy$
- java.lang.Object
-
- akka.stream.javadsl.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> 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.
-
-
-
Field Detail
-
MODULE$
public static final DelayStrategy$ MODULE$
Static reference to the singleton instance of this Scala object.
-
-
Method Detail
-
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
-
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 byincreaseStep
every time whenneedsIncrease
returnstrue
, whenneedsIncrease
returnsfalse
it resets toinitialDelay
.- Parameters:
increaseStep
- step by which delay is increasedneedsIncrease
- iftrue
delay increases, iffalse
delay resets toinitialDelay
-
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 withinitialDelay
for each element, increases byincreaseStep
every time whenneedsIncrease
returnstrue
. whenneedsIncrease
returnsfalse
it resets toinitialDelay
.- Parameters:
increaseStep
- step by which delay is increasedneedsIncrease
- iftrue
delay increases, iffalse
delay resets toinitialDelay
initialDelay
- initial delay for each of elements
-
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 withinitialDelay
for each element, increases byincreaseStep
every time whenneedsIncrease
returnstrue
up tomaxDelay
, whenneedsIncrease
returnsfalse
it resets toinitialDelay
.- Parameters:
increaseStep
- step by which delay is increasedneedsIncrease
- iftrue
delay increases, iffalse
delay resets toinitialDelay
initialDelay
- initial delay for each of elementsmaxDelay
- limits maximum delay
-
-