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 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.

  • Method Details

    • 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. Calls postStop by default.

      Specified by:
      aroundPostStop in interface Actor
    • aroundPreRestart

      void aroundPreRestart(Throwable reason, scala.Option<Object> message)
      Description copied from interface: Actor
      INTERNAL API.

      Can be overridden to intercept calls to preRestart. Calls preRestart by default.

      Specified by:
      aroundPreRestart in interface Actor
    • aroundReceive

      void aroundReceive(scala.PartialFunction<Object,scala.runtime.BoxedUnit> receive, 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 interface Actor
      Parameters:
      receive - current behavior.
      msg - current message.
    • super$aroundPostStop

      void super$aroundPostStop()
    • super$aroundPreRestart

      void super$aroundPreRestart(Throwable reason, scala.Option<Object> message)
      Start and cancel timers via the enclosed TimerScheduler.
    • super$aroundReceive

      void super$aroundReceive(scala.PartialFunction<Object,scala.runtime.BoxedUnit> receive, Object msg)
    • timers

      TimerScheduler timers()
      Start and cancel timers via the enclosed TimerScheduler.