Package akka.stream

Class RestartSettings


  • public final class RestartSettings
    extends java.lang.Object
    • Constructor Detail

      • RestartSettings

        public RestartSettings()
    • 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
      • 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()
      • 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 to 20% delay. In order to skip this additional delay pass in 0
      • 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`
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object