Class RestartSupervisor<T,Thr extends Throwable>
java.lang.Object
org.apache.pekko.actor.typed.BehaviorInterceptor<Object,I>
org.apache.pekko.actor.typed.internal.AbstractSupervisor<T,Thr>
org.apache.pekko.actor.typed.internal.RestartSupervisor<T,Thr>
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classstatic classstatic final classstatic classNested classes/interfaces inherited from class org.apache.pekko.actor.typed.BehaviorInterceptor
BehaviorInterceptor.PreStartTarget<T>, BehaviorInterceptor.ReceiveTarget<T>, BehaviorInterceptor.SignalTarget<T> -
Constructor Summary
ConstructorsConstructorDescriptionRestartSupervisor(Behavior<T> initial, SupervisorStrategy.RestartOrBackoff strategy, scala.reflect.ClassTag<Thr> evidence$5) -
Method Summary
Modifier and TypeMethodDescriptionaroundReceive(TypedActorContext<Object> ctx, Object msg, BehaviorInterceptor.ReceiveTarget<T> target) Intercept a message sent to the running actor.aroundSignal(TypedActorContext<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.Methods inherited from class org.apache.pekko.actor.typed.internal.AbstractSupervisor
aroundStart, dropped, isInstanceOfTheThrowableClass, isSame, log, log, toStringMethods inherited from class org.apache.pekko.actor.typed.BehaviorInterceptor
interceptMessageClass
-
Constructor Details
-
RestartSupervisor
public RestartSupervisor(Behavior<T> initial, SupervisorStrategy.RestartOrBackoff strategy, scala.reflect.ClassTag<Thr> evidence$5)
-
-
Method Details
-
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<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 Throwable> - Returns:
- The behavior for next message or signal
- See Also:
-
aroundReceive
public Behavior<T> aroundReceive(TypedActorContext<Object> ctx, 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<Object,T> - Returns:
- The behavior for next message or signal
-
handleExceptionOnStart
protected scala.PartialFunction<Throwable,Behavior<T>> handleExceptionOnStart(TypedActorContext<Object> ctx, BehaviorInterceptor.PreStartTarget<T> target) - Specified by:
handleExceptionOnStartin classAbstractSupervisor<T,Thr extends Throwable>
-
handleSignalException
protected scala.PartialFunction<Throwable,Behavior<T>> handleSignalException(TypedActorContext<Object> ctx, BehaviorInterceptor.SignalTarget<T> target) - Specified by:
handleSignalExceptionin classAbstractSupervisor<T,Thr extends Throwable>
-
handleReceiveException
protected scala.PartialFunction<Throwable,Behavior<T>> handleReceiveException(TypedActorContext<Object> ctx, BehaviorInterceptor.ReceiveTarget<T> target) - Specified by:
handleReceiveExceptionin classAbstractSupervisor<T,Thr extends Throwable>
-