Package org.apache.pekko.stream
Class RestartSettings
java.lang.Object
org.apache.pekko.stream.RestartSettings
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classstatic class -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic RestartSettingsapply(scala.concurrent.duration.FiniteDuration minBackoff, scala.concurrent.duration.FiniteDuration maxBackoff, double randomFactor) Scala APIstatic RestartSettingsJava APIstatic RestartSettings.LogSettingscreateLogSettings(Logging.LogLevel logLevel) Java APIscala.concurrent.duration.FiniteDurationintscala.concurrent.duration.FiniteDurationscala.concurrent.duration.FiniteDurationdoubletoString()withLogSettings(RestartSettings.LogSettings newLogSettings) withMaxBackoff(Duration value) Java API: the exponential back-off is capped to this durationwithMaxBackoff(scala.concurrent.duration.FiniteDuration value) Scala API: the exponential back-off is capped to this durationwithMaxRestarts(int count, Duration within) Java API: The amount of restarts is capped to `count` within a timeframe of `within`withMaxRestarts(int count, scala.concurrent.duration.FiniteDuration within) Scala API: The amount of restarts is capped to `count` within a timeframe of `within`withMinBackoff(Duration value) Java API: minimum (initial) duration until the child actor will started again, if it is terminatedwithMinBackoff(scala.concurrent.duration.FiniteDuration value) Scala API: minimum (initial) duration until the child actor will started again, if it is terminatedwithRandomFactor(double value) After calculation of the exponential back-off an additional random delay based on this factor is added e.g.withRestartOn(Predicate<Throwable> restartOn) Decides whether the failure should restart the stream or make the surrounding stream fail
-
Constructor Details
-
RestartSettings
public RestartSettings()
-
-
Method Details
-
apply
public static RestartSettings apply(scala.concurrent.duration.FiniteDuration minBackoff, scala.concurrent.duration.FiniteDuration maxBackoff, double randomFactor) Scala API -
create
Java API -
createLogSettings
Java API -
minBackoff
public scala.concurrent.duration.FiniteDuration minBackoff() -
maxBackoff
public scala.concurrent.duration.FiniteDuration maxBackoff() -
randomFactor
public double randomFactor() -
maxRestarts
public int maxRestarts() -
maxRestartsWithin
public scala.concurrent.duration.FiniteDuration maxRestartsWithin() -
logSettings
-
restartOn
-
withMinBackoff
Scala API: minimum (initial) duration until the child actor will started again, if it is terminated -
withMinBackoff
Java API: minimum (initial) duration until the child actor will started again, if it is terminated -
withMaxBackoff
Scala API: the exponential back-off is capped to this duration -
withMaxBackoff
Java API: the exponential back-off is capped to this duration -
withRandomFactor
After calculation of the exponential back-off an additional random delay based on this factor is added e.g.0.2adds up to20%delay. In order to skip this additional delay pass in0 -
withMaxRestarts
Scala API: The amount of restarts is capped to `count` within a timeframe of `within` -
withMaxRestarts
Java API: The amount of restarts is capped to `count` within a timeframe of `within` -
withRestartOn
Decides whether the failure should restart the stream or make the surrounding stream fail -
withLogSettings
-
toString
-