Class BackoffSupervisor$


  • public class BackoffSupervisor$
    extends java.lang.Object
    • Field Detail

      • MODULE$

        public static final BackoffSupervisor$ MODULE$
        Static reference to the singleton instance of this Scala object.
    • Constructor Detail

      • BackoffSupervisor$

        public BackoffSupervisor$()
    • Method Detail

      • props

        public Props props​(Props childProps,
                           java.lang.String childName,
                           scala.concurrent.duration.FiniteDuration minBackoff,
                           scala.concurrent.duration.FiniteDuration maxBackoff,
                           double randomFactor)
        Deprecated.
        Use props with BackoffOpts instead. Since Akka 2.5.22.
        Props for creating a BackoffSupervisor actor.

        Exceptions in the child are handled with the default supervision strategy, i.e. most exceptions will immediately restart the child. You can define another supervision strategy by using propsWithSupervisorStrategy(org.apache.pekko.actor.Props, java.lang.String, scala.concurrent.duration.FiniteDuration, scala.concurrent.duration.FiniteDuration, double, org.apache.pekko.actor.SupervisorStrategy).

        Parameters:
        childProps - the pekko.actor.Props of the child actor that will be started and supervised
        childName - name of the child actor
        minBackoff - minimum (initial) duration until the child actor will started again, if it is terminated
        maxBackoff - the exponential back-off is capped to this duration
        randomFactor - 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.
      • props

        public Props props​(Props childProps,
                           java.lang.String childName,
                           scala.concurrent.duration.FiniteDuration minBackoff,
                           scala.concurrent.duration.FiniteDuration maxBackoff,
                           double randomFactor,
                           int maxNrOfRetries)
        Deprecated.
        Use props with BackoffOpts instead. Since Akka 2.5.22.
        Props for creating a BackoffSupervisor actor.

        Exceptions in the child are handled with the default supervision strategy, i.e. most exceptions will immediately restart the child. You can define another supervision strategy by using propsWithSupervisorStrategy(org.apache.pekko.actor.Props, java.lang.String, scala.concurrent.duration.FiniteDuration, scala.concurrent.duration.FiniteDuration, double, org.apache.pekko.actor.SupervisorStrategy).

        Parameters:
        childProps - the pekko.actor.Props of the child actor that will be started and supervised
        childName - name of the child actor
        minBackoff - minimum (initial) duration until the child actor will started again, if it is terminated
        maxBackoff - the exponential back-off is capped to this duration
        randomFactor - 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.
        maxNrOfRetries - maximum number of attempts to restart the child actor. The supervisor will terminate itself after the maxNoOfRetries is reached. In order to restart infinitely pass in -1.
      • props

        public Props props​(Props childProps,
                           java.lang.String childName,
                           java.time.Duration minBackoff,
                           java.time.Duration maxBackoff,
                           double randomFactor)
        Deprecated.
        Use props with BackoffOpts instead. Since Akka 2.5.22.
        Props for creating a BackoffSupervisor actor.

        Exceptions in the child are handled with the default supervision strategy, i.e. most exceptions will immediately restart the child. You can define another supervision strategy by using propsWithSupervisorStrategy(org.apache.pekko.actor.Props, java.lang.String, scala.concurrent.duration.FiniteDuration, scala.concurrent.duration.FiniteDuration, double, org.apache.pekko.actor.SupervisorStrategy).

        Parameters:
        childProps - the pekko.actor.Props of the child actor that will be started and supervised
        childName - name of the child actor
        minBackoff - minimum (initial) duration until the child actor will started again, if it is terminated
        maxBackoff - the exponential back-off is capped to this duration
        randomFactor - 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.
      • props

        public Props props​(Props childProps,
                           java.lang.String childName,
                           java.time.Duration minBackoff,
                           java.time.Duration maxBackoff,
                           double randomFactor,
                           int maxNrOfRetries)
        Deprecated.
        Use props with BackoffOpts instead. Since Akka 2.5.22.
        Props for creating a BackoffSupervisor actor.

        Exceptions in the child are handled with the default supervision strategy, i.e. most exceptions will immediately restart the child. You can define another supervision strategy by using propsWithSupervisorStrategy(org.apache.pekko.actor.Props, java.lang.String, scala.concurrent.duration.FiniteDuration, scala.concurrent.duration.FiniteDuration, double, org.apache.pekko.actor.SupervisorStrategy).

        Parameters:
        childProps - the pekko.actor.Props of the child actor that will be started and supervised
        childName - name of the child actor
        minBackoff - minimum (initial) duration until the child actor will started again, if it is terminated
        maxBackoff - the exponential back-off is capped to this duration
        randomFactor - 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.
        maxNrOfRetries - maximum number of attempts to restart the child actor. The supervisor will terminate itself after the maxNoOfRetries is reached. In order to restart infinitely pass in -1.
      • propsWithSupervisorStrategy

        public Props propsWithSupervisorStrategy​(Props childProps,
                                                 java.lang.String childName,
                                                 scala.concurrent.duration.FiniteDuration minBackoff,
                                                 scala.concurrent.duration.FiniteDuration maxBackoff,
                                                 double randomFactor,
                                                 SupervisorStrategy strategy)
        Deprecated.
        Use props with BackoffOpts instead. Since Akka 2.5.22.
        Props for creating a BackoffSupervisor actor with a custom supervision strategy.

        Exceptions in the child are handled with the given supervisionStrategy. A Restart will perform a normal immediate restart of the child. A Stop will stop the child, but it will be started again after the back-off duration.

        Parameters:
        childProps - the pekko.actor.Props of the child actor that will be started and supervised
        childName - name of the child actor
        minBackoff - minimum (initial) duration until the child actor will started again, if it is terminated
        maxBackoff - the exponential back-off is capped to this duration
        randomFactor - 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.
        strategy - the supervision strategy to use for handling exceptions in the child. As the BackoffSupervisor creates a separate actor to handle the backoff process, only a OneForOneStrategy makes sense here.
      • propsWithSupervisorStrategy

        public Props propsWithSupervisorStrategy​(Props childProps,
                                                 java.lang.String childName,
                                                 java.time.Duration minBackoff,
                                                 java.time.Duration maxBackoff,
                                                 double randomFactor,
                                                 SupervisorStrategy strategy)
        Deprecated.
        Use props with BackoffOpts instead. Since Akka 2.5.22.
        Props for creating a BackoffSupervisor actor with a custom supervision strategy.

        Exceptions in the child are handled with the given supervisionStrategy. A Restart will perform a normal immediate restart of the child. A Stop will stop the child, but it will be started again after the back-off duration.

        Parameters:
        childProps - the pekko.actor.Props of the child actor that will be started and supervised
        childName - name of the child actor
        minBackoff - minimum (initial) duration until the child actor will started again, if it is terminated
        maxBackoff - the exponential back-off is capped to this duration
        randomFactor - 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.
        strategy - the supervision strategy to use for handling exceptions in the child. As the BackoffSupervisor creates a separate actor to handle the backoff process, only a OneForOneStrategy makes sense here.
      • props

        public Props props​(BackoffOptions options)
        Deprecated.
        Use new API from BackoffOpts object instead. Since Akka 2.5.22.
        Props for creating a BackoffSupervisor actor from BackoffOptions.

        Parameters:
        options - the BackoffOptions that specify how to construct a backoff-supervisor.
      • reset

        public BackoffSupervisor.Reset$ reset()
        Java API: Send this message to the BackoffSupervisor and it will reset the back-off. This should be used in conjunction with withManualReset in BackoffOptions.