Class SupervisorStrategy.Restart

    • Constructor Detail

      • Restart

        public Restart​(int maxRestarts,
                       scala.concurrent.duration.FiniteDuration withinTimeRange,
                       boolean loggingEnabled,
                       boolean stopChildren,
                       int stashCapacity)
    • Method Detail

      • withinTimeRange

        public scala.concurrent.duration.FiniteDuration withinTimeRange()
      • withLimit

        public RestartSupervisorStrategy withLimit​(int maxNrOfRetries,
                                                   scala.concurrent.duration.FiniteDuration withinTimeRange)
        Description copied from class: RestartSupervisorStrategy
        Scala API: Restart with a limit of number of restart retries. The number of restarts are limited to a number of restart attempts (maxNrOfRetries) within a time range (withinTimeRange). When the time window has elapsed without reaching maxNrOfRetries the restart count is reset.

        The strategy is applied also if the actor behavior is deferred and throws an exception during startup.

        Specified by:
        withLimit in class RestartSupervisorStrategy
        Parameters:
        maxNrOfRetries - the number of times a child actor is allowed to be restarted, if the limit is exceeded the child actor is stopped
        withinTimeRange - duration of the time window for maxNrOfRetries
        Returns:
        (undocumented)
      • withLimit

        public RestartSupervisorStrategy withLimit​(int maxNrOfRetries,
                                                   java.time.Duration withinTimeRange)
        Description copied from class: RestartSupervisorStrategy
        Java API: Restart with a limit of number of restart retries. The number of restarts are limited to a number of restart attempts (maxNrOfRetries) within a time range (withinTimeRange). When the time window has elapsed without reaching maxNrOfRetries the restart count is reset.

        The strategy is applied also if the actor behavior is deferred and throws an exception during startup.

        Specified by:
        withLimit in class RestartSupervisorStrategy
        Parameters:
        maxNrOfRetries - the number of times a child actor is allowed to be restarted, if the limit is exceeded the child actor is stopped
        withinTimeRange - duration of the time window for maxNrOfRetries
        Returns:
        (undocumented)
      • withStashCapacity

        public RestartSupervisorStrategy withStashCapacity​(int capacity)
        Description copied from class: RestartSupervisorStrategy
        While restarting (waiting for 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.

        Specified by:
        withStashCapacity in class RestartSupervisorStrategy
        Parameters:
        capacity - (undocumented)
        Returns:
        (undocumented)
      • copy

        public SupervisorStrategy.Restart copy​(int maxRestarts,
                                               scala.concurrent.duration.FiniteDuration withinTimeRange,
                                               boolean loggingEnabled,
                                               boolean stopChildren,
                                               int stashCapacity)
      • copy$default$1

        public int copy$default$1()
      • copy$default$2

        public scala.concurrent.duration.FiniteDuration copy$default$2()
      • copy$default$3

        public boolean copy$default$3()
      • copy$default$4

        public boolean copy$default$4()
      • copy$default$5

        public int copy$default$5()
      • productPrefix

        public java.lang.String productPrefix()
        Specified by:
        productPrefix in interface scala.Product
      • productArity

        public int productArity()
        Specified by:
        productArity in interface scala.Product
      • productElement

        public java.lang.Object productElement​(int x$1)
        Specified by:
        productElement in interface scala.Product
      • productIterator

        public scala.collection.Iterator<java.lang.Object> productIterator()
        Specified by:
        productIterator in interface scala.Product
      • canEqual

        public boolean canEqual​(java.lang.Object x$1)
        Specified by:
        canEqual in interface scala.Equals
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

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

        public boolean equals​(java.lang.Object x$1)
        Specified by:
        equals in interface scala.Equals
        Overrides:
        equals in class java.lang.Object