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 class
RestartSettings.LogSettings
static class
RestartSettings.LogSettings$
-
Constructor Summary
Constructors Constructor Description RestartSettings()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static RestartSettings
apply(scala.concurrent.duration.FiniteDuration minBackoff, scala.concurrent.duration.FiniteDuration maxBackoff, double randomFactor)
Scala APIstatic RestartSettings
create(java.time.Duration minBackoff, java.time.Duration maxBackoff, double randomFactor)
Java APIstatic RestartSettings.LogSettings
createLogSettings(Logging.LogLevel logLevel)
Java APIRestartSettings.LogSettings
logSettings()
scala.concurrent.duration.FiniteDuration
maxBackoff()
int
maxRestarts()
scala.concurrent.duration.FiniteDuration
maxRestartsWithin()
scala.concurrent.duration.FiniteDuration
minBackoff()
double
randomFactor()
scala.Function1<java.lang.Throwable,java.lang.Object>
restartOn()
java.lang.String
toString()
RestartSettings
withLogSettings(RestartSettings.LogSettings newLogSettings)
RestartSettings
withMaxBackoff(java.time.Duration value)
Java API: the exponential back-off is capped to this durationRestartSettings
withMaxBackoff(scala.concurrent.duration.FiniteDuration value)
Scala API: the exponential back-off is capped to this durationRestartSettings
withMaxRestarts(int count, java.time.Duration within)
Java API: The amount of restarts is capped to `count` within a timeframe of `within`RestartSettings
withMaxRestarts(int count, scala.concurrent.duration.FiniteDuration within)
Scala API: The amount of restarts is capped to `count` within a timeframe of `within`RestartSettings
withMinBackoff(java.time.Duration value)
Java API: minimum (initial) duration until the child actor will started again, if it is terminatedRestartSettings
withMinBackoff(scala.concurrent.duration.FiniteDuration value)
Scala API: minimum (initial) duration until the child actor will started again, if it is terminatedRestartSettings
withRandomFactor(double value)
After calculation of the exponential back-off an additional random delay based on this factor is added e.g.RestartSettings
withRestartOn(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.2
adds 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:
toString
in classjava.lang.Object
-
-