public static class JournalPerfSpec.BenchActor extends java.lang.Object implements PersistentActor, ActorLogging
Eventsourced.AsyncHandlerInvocation, Eventsourced.AsyncHandlerInvocation$, Eventsourced.PendingHandlerInvocation, Eventsourced.RecoveryTick, Eventsourced.RecoveryTick$, Eventsourced.StashingHandlerInvocation, Eventsourced.StashingHandlerInvocation$, Eventsourced.State
Actor.emptyBehavior$, Actor.ignoringBehavior$
Constructor and Description |
---|
BenchActor(java.lang.String persistenceId,
ActorRef replyTo,
int replyAfter) |
Modifier and Type | Method and Description |
---|---|
ActorContext |
context()
Stores the context for this actor, including self, and sender.
|
int |
counter() |
protected ActorRef |
journal() |
DequeBasedMessageQueueSemantics |
mailbox() |
java.lang.String |
persistenceId()
Id of the persistent entity for which messages should be replayed.
|
scala.PartialFunction<java.lang.Object,scala.runtime.BoxedUnit> |
receiveCommand()
Command handler.
|
scala.PartialFunction<java.lang.Object,scala.runtime.BoxedUnit> |
receiveRecover()
Recovery handler that receives persisted events during recovery.
|
ActorRef |
self()
The 'self' field holds the ActorRef for this actor.
|
protected ActorRef |
snapshotStore()
Snapshot store plugin actor.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
receive
aroundPostRestart, aroundPostStop, aroundPreRestart, aroundPreStart, aroundReceive, changeState, deferAsync, deleteMessages, flushBatch, flushJournalBatch, lastSequenceNr, log, nextSequenceNr, onPersistFailure, onPersistRejected, onRecoveryFailure, onReplaySuccess, peekApplyHandler, persist, persist, persistAll, persistAllAsync, persistAsync, persistAsync, recovering, recoveryFinished, recoveryRunning, recoveryStarted, requestRecoveryPermit, setLastSequenceNr, snapshotSequenceNr, snapshotterId, startRecovery, stashInternally, unhandled, unstashAll, unstashInternally, updateLastSequenceNr, waitingRecoveryPermit
deleteSnapshot, deleteSnapshots, loadSnapshot, saveSnapshot
internalStashOverflowStrategy
postRestart, preStart, sender, supervisorStrategy
actorCell, clearStash, enqueueFirst, prepend, stash, unstash, unstashAll
createStash
journalPluginId, snapshotPluginId
recovery
log
public BenchActor(java.lang.String persistenceId, ActorRef replyTo, int replyAfter)
protected ActorRef journal()
journal
in interface Eventsourced
protected ActorRef snapshotStore()
Snapshotter
snapshotStore
in interface Eventsourced
snapshotStore
in interface Snapshotter
public DequeBasedMessageQueueSemantics mailbox()
mailbox
in interface StashSupport
public ActorContext context()
Actor
forward
.
WARNING: Only valid within the Actor itself, so do not close over it and publish it to other threads!
ActorContext
is the Scala API. getContext
returns a
UntypedActorContext
, which is the Java API of the actor
context.
context
in interface Actor
context
in interface StashSupport
public final ActorRef self()
Actor
self ! message
self
in interface Actor
self
in interface StashSupport
public java.lang.String persistenceId()
PersistenceIdentity
persistenceId
in interface PersistenceIdentity
public int counter()
public scala.PartialFunction<java.lang.Object,scala.runtime.BoxedUnit> receiveCommand()
Eventsourced
persist
.receiveCommand
in interface Eventsourced
public scala.PartialFunction<java.lang.Object,scala.runtime.BoxedUnit> receiveRecover()
Eventsourced
SnapshotOffer
message
followed by events that are younger than the offered snapshot.
This handler must not have side-effects other than changing persistent actor state i.e. it should not perform actions that may fail, such as interacting with external services, for example.
If there is a problem with recovering the state of the actor from the journal, the error will be logged and the actor will be stopped.
receiveRecover
in interface Eventsourced
Recovery