Package akka.stream
Class RestartSettings
- java.lang.Object
-
- akka.stream.RestartSettings
-
public final class RestartSettings extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classRestartSettings.LogSettingsstatic classRestartSettings.LogSettings$
-
Constructor Summary
Constructors Constructor Description RestartSettings()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static RestartSettingsapply(scala.concurrent.duration.FiniteDuration minBackoff, scala.concurrent.duration.FiniteDuration maxBackoff, double randomFactor)Scala APIstatic RestartSettingscreate(java.time.Duration minBackoff, java.time.Duration maxBackoff, double randomFactor)Java APIstatic RestartSettings.LogSettingscreateLogSettings(Logging.LogLevel logLevel)Java APIRestartSettings.LogSettingslogSettings()scala.concurrent.duration.FiniteDurationmaxBackoff()intmaxRestarts()scala.concurrent.duration.FiniteDurationmaxRestartsWithin()scala.concurrent.duration.FiniteDurationminBackoff()doublerandomFactor()scala.Function1<java.lang.Throwable,java.lang.Object>restartOn()java.lang.StringtoString()RestartSettingswithLogSettings(RestartSettings.LogSettings newLogSettings)RestartSettingswithMaxBackoff(java.time.Duration value)Java API: the exponential back-off is capped to this durationRestartSettingswithMaxBackoff(scala.concurrent.duration.FiniteDuration value)Scala API: the exponential back-off is capped to this durationRestartSettingswithMaxRestarts(int count, java.time.Duration within)Java API: The amount of restarts is capped to `count` within a timeframe of `within`RestartSettingswithMaxRestarts(int count, scala.concurrent.duration.FiniteDuration within)Scala API: The amount of restarts is capped to `count` within a timeframe of `within`RestartSettingswithMinBackoff(java.time.Duration value)Java API: minimum (initial) duration until the child actor will started again, if it is terminatedRestartSettingswithMinBackoff(scala.concurrent.duration.FiniteDuration value)Scala API: minimum (initial) duration until the child actor will started again, if it is terminatedRestartSettingswithRandomFactor(double value)After calculation of the exponential back-off an additional random delay based on this factor is added e.g.RestartSettingswithRestartOn(java.util.function.Predicate<java.lang.Throwable> restartOn)Decides whether the failure should restart the stream or make the surrounding stream fail
-
-
-
Method Detail
-
apply
public static RestartSettings apply(scala.concurrent.duration.FiniteDuration minBackoff, scala.concurrent.duration.FiniteDuration maxBackoff, double randomFactor)
Scala API
-
create
public static RestartSettings create(java.time.Duration minBackoff, java.time.Duration maxBackoff, double randomFactor)
Java API
-
createLogSettings
public static RestartSettings.LogSettings createLogSettings(Logging.LogLevel logLevel)
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
public RestartSettings.LogSettings logSettings()
-
restartOn
public scala.Function1<java.lang.Throwable,java.lang.Object> restartOn()
-
withMinBackoff
public RestartSettings withMinBackoff(scala.concurrent.duration.FiniteDuration value)
Scala API: minimum (initial) duration until the child actor will started again, if it is terminated
-
withMinBackoff
public RestartSettings withMinBackoff(java.time.Duration value)
Java API: minimum (initial) duration until the child actor will started again, if it is terminated
-
withMaxBackoff
public RestartSettings withMaxBackoff(scala.concurrent.duration.FiniteDuration value)
Scala API: the exponential back-off is capped to this duration
-
withMaxBackoff
public RestartSettings withMaxBackoff(java.time.Duration value)
Java API: the exponential back-off is capped to this duration
-
withRandomFactor
public RestartSettings withRandomFactor(double value)
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
public RestartSettings withMaxRestarts(int count, scala.concurrent.duration.FiniteDuration within)
Scala API: The amount of restarts is capped to `count` within a timeframe of `within`
-
withMaxRestarts
public RestartSettings withMaxRestarts(int count, java.time.Duration within)
Java API: The amount of restarts is capped to `count` within a timeframe of `within`
-
withRestartOn
public RestartSettings withRestartOn(java.util.function.Predicate<java.lang.Throwable> restartOn)
Decides whether the failure should restart the stream or make the surrounding stream fail
-
withLogSettings
public RestartSettings withLogSettings(RestartSettings.LogSettings newLogSettings)
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-