public class PersistentShardCoordinator extends ShardCoordinator implements PersistentActor
ClusterSharding extension
ShardCoordinator.AbstractShardAllocationStrategy, ShardCoordinator.Internal$, ShardCoordinator.LeastShardAllocationStrategy, ShardCoordinator.RebalanceWorker, ShardCoordinator.ShardAllocationStrategy
Eventsourced.AsyncHandlerInvocation, Eventsourced.AsyncHandlerInvocation$, Eventsourced.PendingHandlerInvocation, Eventsourced.RecoveryTick, Eventsourced.RecoveryTick$, Eventsourced.StashingHandlerInvocation, Eventsourced.StashingHandlerInvocation$, Eventsourced.State
Actor.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, watchStateActors
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
context, postRestart, preStart, self, sender, supervisorStrategy
actorCell, clearStash, context, enqueueFirst, prepend, self, stash, unstash, unstashAll
createStash
recovery
log
public PersistentShardCoordinator(java.lang.String typeName, ClusterShardingSettings settings, ShardCoordinator.ShardAllocationStrategy allocationStrategy)
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 java.lang.String persistenceId()
PersistenceIdentity
persistenceId
in interface PersistenceIdentity
public java.lang.String journalPluginId()
PersistenceIdentity
akka.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 PersistenceIdentity
public java.lang.String snapshotPluginId()
PersistenceIdentity
akka.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 PersistenceIdentity
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
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> 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 ShardCoordinator
public void saveSnapshotWhenNeeded()