DelayStrategy

org.apache.pekko.stream.javadsl.DelayStrategy
See theDelayStrategy companion trait
object DelayStrategy

Attributes

Companion
trait
Source
DelayStrategy.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Value members

Concrete methods

def fixedDelay[T](delay: Duration): DelayStrategy[T]

Fixed delay strategy, always returns constant delay for any element.

Fixed delay strategy, always returns constant delay for any element.

Value parameters

delay

value of the delay

Attributes

Source
DelayStrategy.scala
def linearIncreasingDelay[T](increaseStep: Duration, needsIncrease: T => Boolean): DelayStrategy[T]

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.

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.

Value parameters

increaseStep

step by which delay is increased

needsIncrease

if true delay increases, if false delay resets to initialDelay

Attributes

Source
DelayStrategy.scala
def linearIncreasingDelay[T](increaseStep: Duration, needsIncrease: T => Boolean, initialDelay: Duration): DelayStrategy[T]

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.

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.

Value parameters

increaseStep

step by which delay is increased

initialDelay

initial delay for each of elements

needsIncrease

if true delay increases, if false delay resets to initialDelay

Attributes

Source
DelayStrategy.scala
def linearIncreasingDelay[T](increaseStep: Duration, needsIncrease: T => Boolean, initialDelay: Duration, maxDelay: Duration): DelayStrategy[T]

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.

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.

Value parameters

increaseStep

step by which delay is increased

initialDelay

initial delay for each of elements

maxDelay

limits maximum delay

needsIncrease

if true delay increases, if false delay resets to initialDelay

Attributes

Source
DelayStrategy.scala