|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface UnrestrictedStash
A version of Stash
that does not enforce any mailbox type. The proper mailbox has to be configured
manually, and the mailbox should extend the DequeBasedMessageQueueSemantics
marker trait.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface akka.actor.Actor |
---|
Actor.emptyBehavior$ |
Method Summary | |
---|---|
int |
capacity()
|
DequeBasedMessageQueueSemantics |
mailbox()
|
void |
postStop()
Overridden callback. |
void |
preRestart(java.lang.Throwable reason,
scala.Option<java.lang.Object> message)
Overridden callback. |
void |
stash()
Adds the current message (the message that the actor received last) to the actor's stash. |
scala.collection.immutable.Vector<Envelope> |
theStash()
|
void |
unstashAll()
Prepends all messages in the stash to the mailbox, and then clears the stash. |
Methods inherited from interface akka.actor.Actor |
---|
context, noSender, postRestart, preStart, receive, self, sender, supervisorStrategy, unhandled |
Method Detail |
---|
scala.collection.immutable.Vector<Envelope> theStash()
int capacity()
DequeBasedMessageQueueSemantics mailbox()
void stash()
StashOverflowException
- in case of a stash capacity violation
java.lang.IllegalStateException
- if the same message is stashed more than oncevoid unstashAll()
Messages from the stash are enqueued to the mailbox until the capacity of the
mailbox (if any) has been reached. In case a bounded mailbox overflows, a
MessageQueueAppendFailedException
is thrown.
The stash is guaranteed to be empty after calling unstashAll()
.
void preRestart(java.lang.Throwable reason, scala.Option<java.lang.Object> message)
preRestart
in interface Actor
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.void postStop()
postStop
in interface Actor
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |