Package akka.persistence.typed.internal
Interface StashManagement<C,E,S>
-
public interface StashManagement<C,E,S>
INTERNAL API: Stash management for persistent behaviors
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ActorContext<InternalProtocol>
context()
boolean
isInternalStashEmpty()
boolean
isStashEmpty()
boolean
isUnstashAllInProgress()
void
logStashMessage(InternalProtocol msg, StashBuffer<InternalProtocol> buffer)
void
logUnstashAll()
void
logUnstashMessage(StashBuffer<InternalProtocol> buffer)
akka.persistence.typed.internal.BehaviorSetup<C,E,S>
setup()
void
stash(InternalProtocol msg, StashBuffer<InternalProtocol> buffer)
Behavior<InternalProtocol>
stashInternal(InternalProtocol msg)
Stash a command to the internal stash buffer, which is used while waiting for persist to be completed.akka.persistence.typed.internal.StashState
stashState()
void
stashUser(InternalProtocol msg)
Stash a command to the user stash buffer, which is used whenStash
effect is used.Behavior<InternalProtocol>
tryUnstashOne(Behavior<InternalProtocol> behavior)
tryUnstashOne
is called at the end of processing each command, published event, or when persist is completedvoid
unstashAll()
SubsequenttryUnstashOne
will drain the user stash buffer before using the internal stash buffer.
-
-
-
Method Detail
-
context
ActorContext<InternalProtocol> context()
-
isInternalStashEmpty
boolean isInternalStashEmpty()
-
isStashEmpty
boolean isStashEmpty()
- Returns:
- false if
tryUnstashOne
will unstash a message
-
isUnstashAllInProgress
boolean isUnstashAllInProgress()
-
logStashMessage
void logStashMessage(InternalProtocol msg, StashBuffer<InternalProtocol> buffer)
-
logUnstashAll
void logUnstashAll()
-
logUnstashMessage
void logUnstashMessage(StashBuffer<InternalProtocol> buffer)
-
stash
void stash(InternalProtocol msg, StashBuffer<InternalProtocol> buffer)
-
stashInternal
Behavior<InternalProtocol> stashInternal(InternalProtocol msg)
Stash a command to the internal stash buffer, which is used while waiting for persist to be completed.
-
stashState
akka.persistence.typed.internal.StashState stashState()
-
stashUser
void stashUser(InternalProtocol msg)
Stash a command to the user stash buffer, which is used whenStash
effect is used.
-
tryUnstashOne
Behavior<InternalProtocol> tryUnstashOne(Behavior<InternalProtocol> behavior)
tryUnstashOne
is called at the end of processing each command, published event, or when persist is completed
-
unstashAll
void unstashAll()
SubsequenttryUnstashOne
will drain the user stash buffer before using the internal stash buffer. It will unstash as many commands as are in the buffer whenunstashAll
was called, i.e. if subsequent commands stash more, those will not be unstashed untilunstashAll
is called again.
-
-