public class PersistentShardCoordinator extends ShardCoordinator implements PersistentActor
ClusterSharding extensionShardCoordinator.AbstractShardAllocationStrategy, ShardCoordinator.Internal$, ShardCoordinator.LeastShardAllocationStrategy, ShardCoordinator.RebalanceWorker, ShardCoordinator.ShardAllocationStrategyEventsourced.AsyncHandlerInvocation, Eventsourced.AsyncHandlerInvocation$, Eventsourced.PendingHandlerInvocation, Eventsourced.RecoveryTick, Eventsourced.RecoveryTick$, Eventsourced.StashingHandlerInvocation, Eventsourced.StashingHandlerInvocation$, Eventsourced.StateActor.emptyBehavior$, Actor.ignoringBehavior$| Constructor and Description |
|---|
PersistentShardCoordinator(java.lang.String typeName,
ClusterShardingSettings settings,
ShardCoordinator.ShardAllocationStrategy allocationStrategy) |
| Modifier and Type | Method and Description |
|---|---|
protected ActorRef |
journal() |
java.lang.String |
journalPluginId()
Configuration id of the journal plugin servicing this persistent actor or view.
|
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.
|
scala.PartialFunction<java.lang.Object,scala.runtime.BoxedUnit> |
receiveSnapshotResult() |
void |
saveSnapshotWhenNeeded() |
java.lang.String |
snapshotPluginId()
Configuration id of the snapshot plugin servicing this persistent actor or view.
|
protected ActorRef |
snapshotStore()
Snapshot store plugin actor.
|
<E extends akka.cluster.sharding.ShardCoordinator.Internal.DomainEvent> |
update(E evt,
scala.Function1<E,scala.runtime.BoxedUnit> f) |
scala.PartialFunction<java.lang.Object,scala.runtime.BoxedUnit> |
waitingForStateInitialized() |
active, akka$actor$Actor$_setter_$context_$eq, akka$actor$Actor$_setter_$self_$eq, akka$actor$ActorLogging$$_log_$eq, akka$actor$ActorLogging$$_log, aliveRegions, allocateShardHomesForRememberEntities, allRegionsRegistered, aroundPostRestart, aroundPostStop, aroundPreRestart, aroundPreStart, aroundReceive, cluster, context, continueGetShardHome, continueRebalance, gracefulShutdownInProgress, hasAllRegionsRegistered, isMember, log, minMembers, postRestart, postStop, preRestart, preStart, props, props, rebalanceInProgress, rebalanceTask, rebalanceWorkerProps, receive, receiveTerminated, regionProxyTerminated, regionTerminated, regionTerminationInProgress, removalMargin, self, sender, sendHostShardMsg, shuttingDown, state, stateInitialized, supervisorStrategy, unAckedHostShards, unhandled, watchStateActorsclone, 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, saveSnapshotinternalStashOverflowStrategycontext, postRestart, preStart, self, sender, supervisorStrategyactorCell, clearStash, context, enqueueFirst, prepend, self, stash, unstash, unstashAllcreateStashrecoverylogpublic PersistentShardCoordinator(java.lang.String typeName,
ClusterShardingSettings settings,
ShardCoordinator.ShardAllocationStrategy allocationStrategy)
protected ActorRef journal()
journal in interface Eventsourcedprotected ActorRef snapshotStore()
SnapshottersnapshotStore in interface EventsourcedsnapshotStore in interface Snapshotterpublic DequeBasedMessageQueueSemantics mailbox()
mailbox in interface StashSupportpublic java.lang.String persistenceId()
PersistenceIdentitypersistenceId in interface PersistenceIdentitypublic java.lang.String journalPluginId()
PersistenceIdentityakka.persistence.journal.plugin to find configuration entry path.
When configured, uses journalPluginId as absolute path to the journal configuration entry.
Configuration entry must contain few required fields, such as class. See src/main/resources/reference.conf.journalPluginId in interface PersistenceIdentitypublic java.lang.String snapshotPluginId()
PersistenceIdentityakka.persistence.snapshot-store.plugin to find configuration entry path.
When configured, uses snapshotPluginId as absolute path to the snapshot store configuration entry.
Configuration entry must contain few required fields, such as class. See src/main/resources/reference.conf.snapshotPluginId in interface PersistenceIdentitypublic 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 EventsourcedRecoverypublic scala.PartialFunction<java.lang.Object,scala.runtime.BoxedUnit> receiveCommand()
Eventsourcedpersist.receiveCommand in interface Eventsourcedpublic scala.PartialFunction<java.lang.Object,scala.runtime.BoxedUnit> waitingForStateInitialized()
public scala.PartialFunction<java.lang.Object,scala.runtime.BoxedUnit> receiveSnapshotResult()
public <E extends akka.cluster.sharding.ShardCoordinator.Internal.DomainEvent> void update(E evt,
scala.Function1<E,scala.runtime.BoxedUnit> f)
update in class ShardCoordinatorpublic void saveSnapshotWhenNeeded()