Class RestartSupervisor<T,Thr extends java.lang.Throwable>
- java.lang.Object
-
- org.apache.pekko.actor.typed.BehaviorInterceptor<java.lang.Object,I>
-
- org.apache.pekko.actor.typed.internal.AbstractSupervisor<T,Thr>
-
- org.apache.pekko.actor.typed.internal.RestartSupervisor<T,Thr>
-
public class RestartSupervisor<T,Thr extends java.lang.Throwable> extends AbstractSupervisor<T,Thr>
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classRestartSupervisor.ResetRestartCountstatic classRestartSupervisor.ResetRestartCount$static classRestartSupervisor.ScheduledRestartstatic classRestartSupervisor.ScheduledRestart$-
Nested classes/interfaces inherited from class org.apache.pekko.actor.typed.BehaviorInterceptor
BehaviorInterceptor.PreStartTarget<T>, BehaviorInterceptor.ReceiveTarget<T>, BehaviorInterceptor.SignalTarget<T>
-
-
Constructor Summary
Constructors Constructor Description RestartSupervisor(Behavior<T> initial, SupervisorStrategy.RestartOrBackoff strategy, scala.reflect.ClassTag<Thr> evidence$5)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Behavior<T>aroundReceive(TypedActorContext<java.lang.Object> ctx, java.lang.Object msg, BehaviorInterceptor.ReceiveTarget<T> target)Intercept a message sent to the running actor.Behavior<T>aroundSignal(TypedActorContext<java.lang.Object> ctx, Signal signal, BehaviorInterceptor.SignalTarget<T> target)Override to intercept a signal sent to the running actor.static scala.concurrent.duration.FiniteDurationcalculateDelay(int restartCount, scala.concurrent.duration.FiniteDuration minBackoff, scala.concurrent.duration.FiniteDuration maxBackoff, double randomFactor)Calculates an exponential back off delay.protected scala.PartialFunction<java.lang.Throwable,Behavior<T>>handleExceptionOnStart(TypedActorContext<java.lang.Object> ctx, BehaviorInterceptor.PreStartTarget<T> target)protected scala.PartialFunction<java.lang.Throwable,Behavior<T>>handleReceiveException(TypedActorContext<java.lang.Object> ctx, BehaviorInterceptor.ReceiveTarget<T> target)protected scala.PartialFunction<java.lang.Throwable,Behavior<T>>handleSignalException(TypedActorContext<java.lang.Object> ctx, BehaviorInterceptor.SignalTarget<T> target)-
Methods inherited from class org.apache.pekko.actor.typed.internal.AbstractSupervisor
aroundStart, dropped, isInstanceOfTheThrowableClass, isSame, log, log, toString
-
Methods inherited from class org.apache.pekko.actor.typed.BehaviorInterceptor
interceptMessageClass
-
-
-
-
Constructor Detail
-
RestartSupervisor
public RestartSupervisor(Behavior<T> initial, SupervisorStrategy.RestartOrBackoff strategy, scala.reflect.ClassTag<Thr> evidence$5)
-
-
Method Detail
-
calculateDelay
public static scala.concurrent.duration.FiniteDuration calculateDelay(int restartCount, scala.concurrent.duration.FiniteDuration minBackoff, scala.concurrent.duration.FiniteDuration maxBackoff, double randomFactor)Calculates an exponential back off delay.
-
aroundSignal
public Behavior<T> aroundSignal(TypedActorContext<java.lang.Object> ctx, Signal signal, BehaviorInterceptor.SignalTarget<T> target)
Description copied from class:BehaviorInterceptorOverride to intercept a signal sent to the running actor. Pass the signal on to the next behavior in the stack by passing it totarget.apply.- Overrides:
aroundSignalin classAbstractSupervisor<T,Thr extends java.lang.Throwable>- Returns:
- The behavior for next message or signal
- See Also:
BehaviorSignalInterceptor
-
aroundReceive
public Behavior<T> aroundReceive(TypedActorContext<java.lang.Object> ctx, java.lang.Object msg, BehaviorInterceptor.ReceiveTarget<T> target)
Description copied from class:BehaviorInterceptorIntercept a message sent to the running actor. Pass the message on to the next behavior in the stack by passing it totarget.apply, returnBehaviors.samewithout invokingtargetto filter out the message.- Specified by:
aroundReceivein classBehaviorInterceptor<java.lang.Object,T>- Returns:
- The behavior for next message or signal
-
handleExceptionOnStart
protected scala.PartialFunction<java.lang.Throwable,Behavior<T>> handleExceptionOnStart(TypedActorContext<java.lang.Object> ctx, BehaviorInterceptor.PreStartTarget<T> target)
- Specified by:
handleExceptionOnStartin classAbstractSupervisor<T,Thr extends java.lang.Throwable>
-
handleSignalException
protected scala.PartialFunction<java.lang.Throwable,Behavior<T>> handleSignalException(TypedActorContext<java.lang.Object> ctx, BehaviorInterceptor.SignalTarget<T> target)
- Specified by:
handleSignalExceptionin classAbstractSupervisor<T,Thr extends java.lang.Throwable>
-
handleReceiveException
protected scala.PartialFunction<java.lang.Throwable,Behavior<T>> handleReceiveException(TypedActorContext<java.lang.Object> ctx, BehaviorInterceptor.ReceiveTarget<T> target)
- Specified by:
handleReceiveExceptionin classAbstractSupervisor<T,Thr extends java.lang.Throwable>
-
-