Package org.apache.pekko.actor
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
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.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.pekko.actor.Actor
Actor.emptyBehavior$, Actor.ignoringBehavior$ -
Method Summary
Modifier and TypeMethodDescriptionvoidpostStop()Overridden callback.voidpreRestart(Throwable reason, scala.Option<Object> message) Overridden callback.voidOverridden callback.voidsuper$preRestart(Throwable reason, scala.Option<Object> message) Overridden callback.Methods inherited from interface org.apache.pekko.actor.Actor
aroundPostRestart, aroundPostStop, aroundPreRestart, aroundPreStart, aroundReceive, context, org$apache$pekko$actor$Actor$_setter_$context_$eq, org$apache$pekko$actor$Actor$_setter_$self_$eq, postRestart, preStart, receive, self, sender, supervisorStrategy, unhandledMethods inherited from interface org.apache.pekko.actor.StashSupport
actorCell, clearStash, context, enqueueFirst, mailbox, org$apache$pekko$actor$StashSupport$_setter_$mailbox_$eq, prepend, self, stash, theStash_$eq, unstash, unstashAll, unstashAll
-
Method Details
-
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. -
preRestart
Overridden callback. Prepends all messages in the stash to the mailbox, clears the stash, stops all children and invokes the postStop() callback.- Specified by:
preRestartin interfaceActor- Parameters:
reason- the Throwable that caused the restart to happenmessage- 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
Overridden callback. Prepends all messages in the stash to the mailbox, clears the stash, stops all children and invokes the postStop() callback.
-