Package org.apache.pekko.actor
Interface Timers
- All Superinterfaces:
Actor
- All Known Implementing Classes:
AbstractActorWithTimers,AbstractPersistentActorWithTimers,PersistentShardCoordinator,ShardCoordinator,UntypedAbstractActorWithTimers
Scala API: Mix in Timers into your Actor to get support for scheduled
self messages via TimerScheduler.
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
Modifier and TypeMethodDescriptionorg.apache.pekko.actor.ActorCellvoidINTERNAL API.voidaroundPreRestart(Throwable reason, scala.Option<Object> message) INTERNAL API.voidaroundReceive(scala.PartialFunction<Object, scala.runtime.BoxedUnit> receive, Object msg) INTERNAL API.voidvoidsuper$aroundPreRestart(Throwable reason, scala.Option<Object> message) Start and cancel timers via the enclosedTimerScheduler.voidsuper$aroundReceive(scala.PartialFunction<Object, scala.runtime.BoxedUnit> receive, Object msg) 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 Details
-
actorCell
org.apache.pekko.actor.ActorCell actorCell() -
aroundPostStop
void aroundPostStop()Description copied from interface:ActorINTERNAL API.Can be overridden to intercept calls to
postStop. CallspostStopby default.- Specified by:
aroundPostStopin interfaceActor
-
aroundPreRestart
Description copied from interface:ActorINTERNAL API.Can be overridden to intercept calls to
preRestart. CallspreRestartby default.- Specified by:
aroundPreRestartin interfaceActor
-
aroundReceive
Description copied from interface:ActorINTERNAL API.Can be overridden to intercept calls to this actor's current behavior.
- Specified by:
aroundReceivein interfaceActor- Parameters:
receive- current behavior.msg- current message.
-
super$aroundPostStop
void super$aroundPostStop() -
super$aroundPreRestart
Start and cancel timers via the enclosedTimerScheduler. -
super$aroundReceive
-
timers
TimerScheduler timers()Start and cancel timers via the enclosedTimerScheduler.
-