Package org.apache.pekko.actor
Interface Timers
-
- All Superinterfaces:
Actor
- All Known Implementing Classes:
AbstractActorWithTimers
,AbstractPersistentActorWithTimers
,PersistentShardCoordinator
,ShardCoordinator
,UntypedAbstractActorWithTimers
public interface Timers extends Actor
Scala API: Mix in Timers into your Actor to get support for scheduledself
messages viaTimerScheduler
.Timers are bound to the lifecycle of the actor that owns it, and thus are cancelled automatically when it is restarted or stopped.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.pekko.actor.Actor
Actor.emptyBehavior$, Actor.ignoringBehavior$
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description org.apache.pekko.actor.ActorCell
actorCell()
void
aroundPostStop()
INTERNAL API.void
aroundPreRestart(java.lang.Throwable reason, scala.Option<java.lang.Object> message)
INTERNAL API.void
aroundReceive(scala.PartialFunction<java.lang.Object,scala.runtime.BoxedUnit> receive, java.lang.Object msg)
INTERNAL API.void
super$aroundPostStop()
void
super$aroundPreRestart(java.lang.Throwable reason, scala.Option<java.lang.Object> message)
Start and cancel timers via the enclosedTimerScheduler
.void
super$aroundReceive(scala.PartialFunction<java.lang.Object,scala.runtime.BoxedUnit> receive, java.lang.Object msg)
TimerScheduler
timers()
Start and cancel timers via the enclosedTimerScheduler
.-
Methods inherited from interface org.apache.pekko.actor.Actor
aroundPostRestart, aroundPreStart, context, org$apache$pekko$actor$Actor$_setter_$context_$eq, org$apache$pekko$actor$Actor$_setter_$self_$eq, postRestart, postStop, preRestart, preStart, receive, self, sender, supervisorStrategy, unhandled
-
-
-
-
Method Detail
-
actorCell
org.apache.pekko.actor.ActorCell actorCell()
-
aroundPostStop
void aroundPostStop()
Description copied from interface:Actor
INTERNAL API.Can be overridden to intercept calls to
postStop
. CallspostStop
by default.- Specified by:
aroundPostStop
in interfaceActor
-
aroundPreRestart
void aroundPreRestart(java.lang.Throwable reason, scala.Option<java.lang.Object> message)
Description copied from interface:Actor
INTERNAL API.Can be overridden to intercept calls to
preRestart
. CallspreRestart
by default.- Specified by:
aroundPreRestart
in interfaceActor
-
aroundReceive
void aroundReceive(scala.PartialFunction<java.lang.Object,scala.runtime.BoxedUnit> receive, java.lang.Object msg)
Description copied from interface:Actor
INTERNAL API.Can be overridden to intercept calls to this actor's current behavior.
- Specified by:
aroundReceive
in interfaceActor
- Parameters:
receive
- current behavior.msg
- current message.
-
super$aroundPostStop
void super$aroundPostStop()
-
super$aroundPreRestart
void super$aroundPreRestart(java.lang.Throwable reason, scala.Option<java.lang.Object> message)
Start and cancel timers via the enclosedTimerScheduler
.
-
super$aroundReceive
void super$aroundReceive(scala.PartialFunction<java.lang.Object,scala.runtime.BoxedUnit> receive, java.lang.Object msg)
-
timers
TimerScheduler timers()
Start and cancel timers via the enclosedTimerScheduler
.
-
-