Class BackoffSupervisorStrategy

    • Constructor Detail

      • BackoffSupervisorStrategy

        public BackoffSupervisorStrategy()
    • Method Detail

      • getResetBackoffAfter

        public abstract java.time.Duration getResetBackoffAfter()
      • resetBackoffAfter

        public abstract scala.concurrent.duration.FiniteDuration resetBackoffAfter()
      • withMaxRestarts

        public abstract BackoffSupervisorStrategy withMaxRestarts​(int maxRestarts)
        Allow at most this number of failed restarts in a row. Zero or negative disables the upper limit on restarts (and is the default)
        Parameters:
        maxRestarts - (undocumented)
        Returns:
        (undocumented)
      • withResetBackoffAfter

        public abstract BackoffSupervisorStrategy withResetBackoffAfter​(scala.concurrent.duration.FiniteDuration timeout)
        Scala API: The back-off algorithm is reset if the actor does not crash within the specified resetBackoffAfter. By default, the resetBackoffAfter has the same value as minBackoff.
        Parameters:
        timeout - (undocumented)
        Returns:
        (undocumented)
      • withResetBackoffAfter

        public abstract BackoffSupervisorStrategy withResetBackoffAfter​(java.time.Duration timeout)
        Java API: The back-off algorithm is reset if the actor does not crash within the specified resetBackoffAfter. By default, the resetBackoffAfter has the same value as minBackoff.
        Parameters:
        timeout - (undocumented)
        Returns:
        (undocumented)
      • withStashCapacity

        public abstract BackoffSupervisorStrategy withStashCapacity​(int capacity)
        While restarting (waiting for backoff to expire and children to stop) incoming messages and signals are stashed, and delivered later to the newly restarted behavior. This property defines the capacity in number of messages of the stash buffer. If the capacity is exceed then additional incoming messages are dropped.

        By default the capacity is defined by config property akka.actor.typed.restart-stash-capacity.

        Parameters:
        capacity - (undocumented)
        Returns:
        (undocumented)
      • withStopChildren

        public abstract BackoffSupervisorStrategy withStopChildren​(boolean enabled)
        Stop or keep child actors when the parent actor is restarted. By default child actors are stopped when parent is restarted.
        Parameters:
        enabled - if true then child actors are stopped, otherwise they are kept
        Returns:
        (undocumented)