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.StateActor.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, waitreceivearoundPostRestart, 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, waitingRecoveryPermitdeleteSnapshot, deleteSnapshots, loadSnapshot, saveSnapshotinternalStashOverflowStrategypostRestart, preStart, sender, supervisorStrategyactorCell, clearStash, enqueueFirst, prepend, stash, unstash, unstashAllcreateStashjournalPluginId, snapshotPluginIdrecoverylogpublic BenchActor(java.lang.String persistenceId,
ActorRef replyTo,
int replyAfter)
protected ActorRef journal()
journal in interface Eventsourcedprotected ActorRef snapshotStore()
SnapshottersnapshotStore in interface EventsourcedsnapshotStore in interface Snapshotterpublic DequeBasedMessageQueueSemantics mailbox()
mailbox in interface StashSupportpublic ActorContext context()
Actorforward.
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 Actorcontext in interface StashSupportpublic final ActorRef self()
Actorself ! message
self in interface Actorself in interface StashSupportpublic java.lang.String persistenceId()
PersistenceIdentitypersistenceId in interface PersistenceIdentitypublic int counter()
public scala.PartialFunction<java.lang.Object,scala.runtime.BoxedUnit> receiveCommand()
Eventsourcedpersist.receiveCommand in interface Eventsourcedpublic scala.PartialFunction<java.lang.Object,scala.runtime.BoxedUnit> receiveRecover()
EventsourcedSnapshotOffer 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 EventsourcedRecovery