Class BackoffOptions
Inheritance
BackoffOptions
Assembly: Akka.dll
Syntax
public abstract class BackoffOptions
Methods
|
Improve this Doc
View Source
WithAutoReset(TimeSpan)
Returns a new BackoffOptions with automatic back-off reset. The back-off algorithm is reset if the child does not crash within the specified resetBackoff
.
Declaration
public abstract BackoffOptions WithAutoReset(TimeSpan resetBackoff)
Parameters
Type |
Name |
Description |
TimeSpan |
resetBackoff |
The back-off is reset if the child does not crash within this duration
|
Returns
|
Improve this Doc
View Source
WithDefaultStoppingStrategy()
Declaration
public abstract BackoffOptions WithDefaultStoppingStrategy()
Returns
|
Improve this Doc
View Source
WithFinalStopMessage(Func<Object, Boolean>)
Predicate evaluated for each message, if it returns true and the supervised actor is stopped then the supervisor will stop its self. If it returns true while the supervised actor is running then it will be forwarded to the supervised actor and when the supervised actor stops itself the supervisor will stop itself.
Declaration
public abstract BackoffOptions WithFinalStopMessage(Func<object, bool> isFinalStopMessage)
Parameters
Returns
|
Improve this Doc
View Source
WithManualReset()
Returns a new BackoffOptions with manual back-off reset. The back-off is only reset if the child sends a BackoffSupervisor.Reset
to its parent(the backoff-supervisor actor).
Declaration
public abstract BackoffOptions WithManualReset()
Returns
|
Improve this Doc
View Source
WithMaxNrOfRetries(Int32)
Returns a new BackoffOptions with a maximum number of retries to restart the child actor. By default, the supervisor will retry infinitely. With this option, the supervisor will terminate itself after the maxNoOfRetries is reached.
Declaration
public abstract BackoffOptions WithMaxNrOfRetries(int maxNrOfRetries)
Parameters
Type |
Name |
Description |
Int32 |
maxNrOfRetries |
The number of times a child actor is allowed to be restarted, negative value means no limit, if the limit is exceeded the child actor is stopped
|
Returns
|
Improve this Doc
View Source
WithReplyWhileStopped(Object)
Returns a new BackoffOptions with a constant reply to messages that the supervisor receives while its child is stopped. By default, a message received while the child is stopped is forwarded to deadLetters
. With this option, the supervisor will reply to the sender instead.
Declaration
public abstract BackoffOptions WithReplyWhileStopped(object replyWhileStopped)
Parameters
Type |
Name |
Description |
Object |
replyWhileStopped |
The message that the supervisor will send in response to all messages while its child is stopped.
|
Returns
|
Improve this Doc
View Source
WithSupervisorStrategy(OneForOneStrategy)
Declaration
public abstract BackoffOptions WithSupervisorStrategy(OneForOneStrategy supervisorStrategy)
Parameters
Type |
Name |
Description |
OneForOneStrategy |
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
|
Returns
Extension Methods