public interface BackoffOptions
Backoff.onStop
or Backoff.onFailure
.
BackoffOptions is immutable, so be sure to chain methods like:
val options = Backoff.onFailure(childProps, childName, minBackoff, maxBackoff, randomFactor)
.withManualReset
context.actorOf(BackoffSupervisor.props(options), name)
Modifier and Type | Method and Description |
---|---|
Props |
props()
Returns the props to create the back-off supervisor.
|
BackoffOptions |
withAutoReset(scala.concurrent.duration.FiniteDuration resetBackoff)
Returns a new BackoffOptions with automatic back-off reset.
|
BackoffOptions |
withDefaultStoppingStrategy()
Returns a new BackoffOptions with a default
SupervisorStrategy.stoppingStrategy . |
BackoffOptions |
withManualReset()
Returns a new BackoffOptions with manual back-off reset.
|
BackoffOptions |
withSupervisorStrategy(OneForOneStrategy supervisorStrategy)
Returns a new BackoffOptions with the supervisorStrategy.
|
BackoffOptions withAutoReset(scala.concurrent.duration.FiniteDuration resetBackoff)
resetBackoff
.resetBackoff
- The back-off is reset if the child does not crash within this duration.BackoffOptions withManualReset()
BackoffSupervisor.Reset
to its parent (the backoff-supervisor actor).BackoffOptions withSupervisorStrategy(OneForOneStrategy supervisorStrategy)
supervisorStrategy
- the supervisorStrategy that the back-off supervisor will use.
The default supervisor strategy is used as fallback if the specified supervisorStrategy (its decider)
does not explicitly handle an exception.BackoffOptions withDefaultStoppingStrategy()
SupervisorStrategy.stoppingStrategy
.
The default supervisor strategy is used as fallback for throwables not handled by SupervisorStrategy.stoppingStrategy
.Props props()