Package akka.pattern
Class BackoffOnFailureOptionsImpl<T>
- java.lang.Object
 - 
- akka.pattern.BackoffOnFailureOptionsImpl<T>
 
 
- 
- All Implemented Interfaces:
 BackoffOnFailureOptions,ExtendedBackoffOptions<BackoffOnFailureOptions>,java.io.Serializable,scala.Equals,scala.Product
public final class BackoffOnFailureOptionsImpl<T> extends java.lang.Object implements BackoffOnFailureOptions, scala.Product, java.io.Serializable
- See Also:
 - Serialized Form
 
 
- 
- 
Constructor Summary
Constructors Constructor Description BackoffOnFailureOptionsImpl(Props childProps, java.lang.String childName, scala.concurrent.duration.FiniteDuration minBackoff, scala.concurrent.duration.FiniteDuration maxBackoff, double randomFactor, scala.Option<BackoffReset> reset, OneForOneStrategy supervisorStrategy, HandlingWhileStopped handlingWhileStopped) 
- 
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static <T> scala.Option<BackoffReset>$lessinit$greater$default$6()static <T> OneForOneStrategy$lessinit$greater$default$7()static <T> HandlingWhileStopped$lessinit$greater$default$8()static <T> BackoffOnFailureOptionsImpl<T>apply(Props childProps, java.lang.String childName, scala.concurrent.duration.FiniteDuration minBackoff, scala.concurrent.duration.FiniteDuration maxBackoff, double randomFactor, scala.Option<BackoffReset> reset, OneForOneStrategy supervisorStrategy, HandlingWhileStopped handlingWhileStopped)static <T> scala.Option<BackoffReset>apply$default$6()static <T> OneForOneStrategyapply$default$7()static <T> HandlingWhileStoppedapply$default$8()booleancanEqual(java.lang.Object x$1)java.lang.StringchildName()PropschildProps()<T> BackoffOnFailureOptionsImpl<T>copy(Props childProps, java.lang.String childName, scala.concurrent.duration.FiniteDuration minBackoff, scala.concurrent.duration.FiniteDuration maxBackoff, double randomFactor, scala.Option<BackoffReset> reset, OneForOneStrategy supervisorStrategy, HandlingWhileStopped handlingWhileStopped)<T> Propscopy$default$1()<T> java.lang.Stringcopy$default$2()<T> scala.concurrent.duration.FiniteDurationcopy$default$3()<T> scala.concurrent.duration.FiniteDurationcopy$default$4()<T> doublecopy$default$5()<T> scala.Option<BackoffReset>copy$default$6()<T> OneForOneStrategycopy$default$7()<T> HandlingWhileStoppedcopy$default$8()booleanequals(java.lang.Object x$1)HandlingWhileStoppedhandlingWhileStopped()inthashCode()scala.concurrent.duration.FiniteDurationmaxBackoff()scala.concurrent.duration.FiniteDurationminBackoff()intproductArity()java.lang.ObjectproductElement(int x$1)java.lang.StringproductElementName(int x$1)scala.collection.Iterator<java.lang.Object>productIterator()java.lang.StringproductPrefix()Propsprops()Returns the props to create the back-off supervisor.doublerandomFactor()scala.Option<BackoffReset>reset()OneForOneStrategysupervisorStrategy()java.lang.StringtoString()static <T> scala.Option<scala.Tuple8<Props,java.lang.String,scala.concurrent.duration.FiniteDuration,scala.concurrent.duration.FiniteDuration,java.lang.Object,scala.Option<BackoffReset>,OneForOneStrategy,HandlingWhileStopped>>unapply(BackoffOnFailureOptionsImpl<T> x$0)BackoffOnFailureOptionsImpl<scala.runtime.Nothing$>withAutoReset(scala.concurrent.duration.FiniteDuration resetBackoff)Returns a new BackoffOptions with automatic back-off reset.BackoffOnFailureOptionsImpl<scala.runtime.Nothing$>withHandlerWhileStopped(ActorRef handlerWhileStopped)Returns a new BackoffOptions with a custom handler for messages that the supervisor receives while its child is stopped.BackoffOnFailureOptionsImpl<scala.runtime.Nothing$>withManualReset()Returns a new BackoffOptions with manual back-off reset.BackoffOnFailureOptionsImpl<scala.runtime.Nothing$>withMaxNrOfRetries(int maxNrOfRetries)Returns a new BackoffOptions with a maximum number of retries to restart the child actor.BackoffOnFailureOptionsImpl<scala.runtime.Nothing$>withReplyWhileStopped(java.lang.Object replyWhileStopped)Returns a new BackoffOptions with a constant reply to messages that the supervisor receives while its child is stopped.BackoffOnFailureOptionsImpl<scala.runtime.Nothing$>withSupervisorStrategy(OneForOneStrategy supervisorStrategy)Returns a new BackoffOptions with the supervisorStrategy. 
 - 
 
- 
- 
Constructor Detail
- 
BackoffOnFailureOptionsImpl
public BackoffOnFailureOptionsImpl(Props childProps, java.lang.String childName, scala.concurrent.duration.FiniteDuration minBackoff, scala.concurrent.duration.FiniteDuration maxBackoff, double randomFactor, scala.Option<BackoffReset> reset, OneForOneStrategy supervisorStrategy, HandlingWhileStopped handlingWhileStopped)
 
 - 
 
- 
Method Detail
- 
$lessinit$greater$default$6
public static <T> scala.Option<BackoffReset> $lessinit$greater$default$6()
 
- 
$lessinit$greater$default$7
public static <T> OneForOneStrategy $lessinit$greater$default$7()
 
- 
$lessinit$greater$default$8
public static <T> HandlingWhileStopped $lessinit$greater$default$8()
 
- 
apply
public static <T> BackoffOnFailureOptionsImpl<T> apply(Props childProps, java.lang.String childName, scala.concurrent.duration.FiniteDuration minBackoff, scala.concurrent.duration.FiniteDuration maxBackoff, double randomFactor, scala.Option<BackoffReset> reset, OneForOneStrategy supervisorStrategy, HandlingWhileStopped handlingWhileStopped)
 
- 
apply$default$6
public static <T> scala.Option<BackoffReset> apply$default$6()
 
- 
apply$default$7
public static <T> OneForOneStrategy apply$default$7()
 
- 
apply$default$8
public static <T> HandlingWhileStopped apply$default$8()
 
- 
unapply
public static <T> scala.Option<scala.Tuple8<Props,java.lang.String,scala.concurrent.duration.FiniteDuration,scala.concurrent.duration.FiniteDuration,java.lang.Object,scala.Option<BackoffReset>,OneForOneStrategy,HandlingWhileStopped>> unapply(BackoffOnFailureOptionsImpl<T> x$0)
 
- 
childProps
public Props childProps()
 
- 
childName
public java.lang.String childName()
 
- 
minBackoff
public scala.concurrent.duration.FiniteDuration minBackoff()
 
- 
maxBackoff
public scala.concurrent.duration.FiniteDuration maxBackoff()
 
- 
randomFactor
public double randomFactor()
 
- 
reset
public scala.Option<BackoffReset> reset()
 
- 
supervisorStrategy
public OneForOneStrategy supervisorStrategy()
 
- 
handlingWhileStopped
public HandlingWhileStopped handlingWhileStopped()
 
- 
withAutoReset
public BackoffOnFailureOptionsImpl<scala.runtime.Nothing$> withAutoReset(scala.concurrent.duration.FiniteDuration resetBackoff)
Description copied from interface:ExtendedBackoffOptionsReturns a new BackoffOptions with automatic back-off reset. The back-off algorithm is reset if the child does not crash within the specifiedresetBackoff.- Specified by:
 withAutoResetin interfaceExtendedBackoffOptions<T>- Parameters:
 resetBackoff- The back-off is reset if the child does not crash within this duration.
 
- 
withManualReset
public BackoffOnFailureOptionsImpl<scala.runtime.Nothing$> withManualReset()
Description copied from interface:ExtendedBackoffOptionsReturns a new BackoffOptions with manual back-off reset. The back-off is only reset if the child sends aBackoffSupervisor.Resetto its parent (the backoff-supervisor actor).- Specified by:
 withManualResetin interfaceExtendedBackoffOptions<T>
 
- 
withSupervisorStrategy
public BackoffOnFailureOptionsImpl<scala.runtime.Nothing$> withSupervisorStrategy(OneForOneStrategy supervisorStrategy)
Description copied from interface:ExtendedBackoffOptionsReturns a new BackoffOptions with the supervisorStrategy.- Specified by:
 withSupervisorStrategyin interfaceExtendedBackoffOptions<T>- Parameters:
 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. As the BackoffSupervisor creates a separate actor to handle the backoff process, only aOneForOneStrategymakes sense here. Note that changing the strategy will replace the previously defined maxNrOfRetries.
 
- 
withReplyWhileStopped
public BackoffOnFailureOptionsImpl<scala.runtime.Nothing$> withReplyWhileStopped(java.lang.Object replyWhileStopped)
Description copied from interface:ExtendedBackoffOptionsReturns 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 todeadLetters. With this option, the supervisor will reply to the sender instead.- Specified by:
 withReplyWhileStoppedin interfaceExtendedBackoffOptions<T>- Parameters:
 replyWhileStopped- The message that the supervisor will send in response to all messages while its child is stopped.
 
- 
withHandlerWhileStopped
public BackoffOnFailureOptionsImpl<scala.runtime.Nothing$> withHandlerWhileStopped(ActorRef handlerWhileStopped)
Description copied from interface:ExtendedBackoffOptionsReturns a new BackoffOptions with a custom handler for messages that the supervisor receives while its child is stopped. By default, a message received while the child is stopped is forwarded todeadLetters. Essentially, this handler replacesdeadLettersallowing to implement custom handling instead of a static reply.- Specified by:
 withHandlerWhileStoppedin interfaceExtendedBackoffOptions<T>- Parameters:
 handlerWhileStopped- PartialFunction of the received message and sender
 
- 
withMaxNrOfRetries
public BackoffOnFailureOptionsImpl<scala.runtime.Nothing$> withMaxNrOfRetries(int maxNrOfRetries)
Description copied from interface:ExtendedBackoffOptionsReturns 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.- Specified by:
 withMaxNrOfRetriesin interfaceExtendedBackoffOptions<T>- Parameters:
 maxNrOfRetries- the number of times a child actor is allowed to be restarted. If negative, the value is unbounded, otherwise the provided limit is used. If the limit is exceeded the child actor will be stopped.
 
- 
props
public Props props()
Description copied from interface:ExtendedBackoffOptionsReturns the props to create the back-off supervisor.- Specified by:
 propsin interfaceExtendedBackoffOptions<T>
 
- 
copy
public <T> BackoffOnFailureOptionsImpl<T> copy(Props childProps, java.lang.String childName, scala.concurrent.duration.FiniteDuration minBackoff, scala.concurrent.duration.FiniteDuration maxBackoff, double randomFactor, scala.Option<BackoffReset> reset, OneForOneStrategy supervisorStrategy, HandlingWhileStopped handlingWhileStopped)
 
- 
copy$default$1
public <T> Props copy$default$1()
 
- 
copy$default$2
public <T> java.lang.String copy$default$2()
 
- 
copy$default$3
public <T> scala.concurrent.duration.FiniteDuration copy$default$3()
 
- 
copy$default$4
public <T> scala.concurrent.duration.FiniteDuration copy$default$4()
 
- 
copy$default$5
public <T> double copy$default$5()
 
- 
copy$default$6
public <T> scala.Option<BackoffReset> copy$default$6()
 
- 
copy$default$7
public <T> OneForOneStrategy copy$default$7()
 
- 
copy$default$8
public <T> HandlingWhileStopped copy$default$8()
 
- 
productPrefix
public java.lang.String productPrefix()
- Specified by:
 productPrefixin interfacescala.Product
 
- 
productArity
public int productArity()
- Specified by:
 productArityin interfacescala.Product
 
- 
productElement
public java.lang.Object productElement(int x$1)
- Specified by:
 productElementin interfacescala.Product
 
- 
productIterator
public scala.collection.Iterator<java.lang.Object> productIterator()
- Specified by:
 productIteratorin interfacescala.Product
 
- 
canEqual
public boolean canEqual(java.lang.Object x$1)
- Specified by:
 canEqualin interfacescala.Equals
 
- 
productElementName
public java.lang.String productElementName(int x$1)
- Specified by:
 productElementNamein interfacescala.Product
 
- 
hashCode
public int hashCode()
- Overrides:
 hashCodein classjava.lang.Object
 
- 
toString
public java.lang.String toString()
- Overrides:
 toStringin classjava.lang.Object
 
- 
equals
public boolean equals(java.lang.Object x$1)
- Specified by:
 equalsin interfacescala.Equals- Overrides:
 equalsin classjava.lang.Object
 
 - 
 
 -