Interface UnrestrictedStash

All Superinterfaces:
Actor, StashSupport
All Known Subinterfaces:
AbstractPersistentActorLike, AsyncWriteProxy, AtLeastOnceDelivery, AtLeastOnceDeliveryLike, Eventsourced, PersistenceStash, PersistentActor, PersistentFSM<S,D,E>, Stash, UnboundedStash
All Known Implementing Classes:
AbstractActorWithStash, AbstractActorWithUnboundedStash, AbstractActorWithUnrestrictedStash, AbstractFSMWithStash, AbstractPersistentActor, AbstractPersistentActorWithAtLeastOnceDelivery, AbstractPersistentActorWithTimers, AbstractPersistentFSM, AbstractPersistentLoggingFSM, JournalPerfSpec.BenchActor, PersistencePluginProxy, PersistentShardCoordinator, UntypedAbstractActorWithStash, UntypedAbstractActorWithUnboundedStash, UntypedAbstractActorWithUnrestrictedStash

public interface UnrestrictedStash extends Actor, StashSupport
A version of pekko.actor.Stash that does not enforce any mailbox type. The proper mailbox has to be configured manually, and the mailbox should extend the pekko.dispatch.DequeBasedMessageQueueSemantics marker trait.
  • Method Details

    • postStop

      void postStop() throws Exception
      Overridden callback. Prepends all messages in the stash to the mailbox and clears the stash. Must be called when overriding this method, otherwise stashed messages won't be propagated to DeadLetters when actor stops.
      Specified by:
      postStop in interface Actor
      Throws:
      Exception
    • preRestart

      void preRestart(Throwable reason, scala.Option<Object> message) throws Exception
      Overridden callback. Prepends all messages in the stash to the mailbox, clears the stash, stops all children and invokes the postStop() callback.
      Specified by:
      preRestart in interface Actor
      Parameters:
      reason - the Throwable that caused the restart to happen
      message - optionally the current message the actor processed when failing, if applicable

      Is called on a crashed Actor right BEFORE it is restarted to allow clean up of resources before Actor is terminated.
      Throws:
      Exception
    • super$postStop

      void super$postStop()
      Overridden callback. Prepends all messages in the stash to the mailbox and clears the stash. Must be called when overriding this method, otherwise stashed messages won't be propagated to DeadLetters when actor stops.
    • super$preRestart

      void super$preRestart(Throwable reason, scala.Option<Object> message)
      Overridden callback. Prepends all messages in the stash to the mailbox, clears the stash, stops all children and invokes the postStop() callback.