Package akka.actor.typed.internal
Class RestartSupervisor<T,Thr extends java.lang.Throwable>
- java.lang.Object
-
- akka.actor.typed.BehaviorInterceptor<java.lang.Object,I>
-
- akka.actor.typed.internal.AbstractSupervisor<T,Thr>
-
- akka.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 class
RestartSupervisor.ResetRestartCount
static class
RestartSupervisor.ResetRestartCount$
static class
RestartSupervisor.ScheduledRestart
static class
RestartSupervisor.ScheduledRestart$
-
Nested classes/interfaces inherited from class akka.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.FiniteDuration
calculateDelay(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 akka.actor.typed.internal.AbstractSupervisor
aroundStart, dropped, isInstanceOfTheThrowableClass, isSame, log, log, toString
-
Methods inherited from class akka.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:BehaviorInterceptor
Override 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:
aroundSignal
in 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:BehaviorInterceptor
Intercept a message sent to the running actor. Pass the message on to the next behavior in the stack by passing it totarget.apply
, returnBehaviors.same
without invokingtarget
to filter out the message.- Specified by:
aroundReceive
in 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:
handleExceptionOnStart
in 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:
handleSignalException
in 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:
handleReceiveException
in classAbstractSupervisor<T,Thr extends java.lang.Throwable>
-
-