Package akka.cluster.sharding
Class PersistentShardCoordinator
- java.lang.Object
- 
- akka.cluster.sharding.ShardCoordinator
- 
- akka.cluster.sharding.PersistentShardCoordinator
 
 
- 
- All Implemented Interfaces:
- Actor,- Stash,- StashFactory,- StashSupport,- Timers,- UnrestrictedStash,- RequiresMessageQueue<DequeBasedMessageQueueSemantics>,- Eventsourced,- PersistenceIdentity,- PersistenceRecovery,- PersistenceStash,- PersistentActor,- Snapshotter
 
 public class PersistentShardCoordinator extends ShardCoordinator implements PersistentActor Deprecated.Use `ddata` mode, persistence mode is deprecated. Since 2.6.0.Singleton coordinator that decides where to allocate shards.Users can migrate to using DData to store state then either Event Sourcing or ddata to store the remembered entities. - See Also:
- ClusterSharding extension
 
- 
- 
Nested Class Summary- 
Nested classes/interfaces inherited from class akka.cluster.sharding.ShardCoordinatorShardCoordinator.AbstractShardAllocationStrategy, ShardCoordinator.ActorSystemDependentAllocationStrategy, ShardCoordinator.Internal$, ShardCoordinator.LeastShardAllocationStrategy, ShardCoordinator.RebalanceWorker$, ShardCoordinator.ShardAllocationStrategy, ShardCoordinator.ShardAllocationStrategy$, ShardCoordinator.StartableAllocationStrategy
 - 
Nested classes/interfaces inherited from interface akka.actor.ActorActor.emptyBehavior$, Actor.ignoringBehavior$
 - 
Nested classes/interfaces inherited from interface akka.persistence.EventsourcedEventsourced.AsyncHandlerInvocation, Eventsourced.AsyncHandlerInvocation$, Eventsourced.PendingHandlerInvocation, Eventsourced.RecoveryTick, Eventsourced.RecoveryTick$, Eventsourced.StashingHandlerInvocation, Eventsourced.StashingHandlerInvocation$, Eventsourced.State
 
- 
 - 
Constructor SummaryConstructors Constructor Description PersistentShardCoordinator(java.lang.String typeName, ClusterShardingSettings settings, ShardCoordinator.ShardAllocationStrategy allocationStrategy)Deprecated.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected voidakka$actor$StashSupport$_setter_$mailbox_$eq(DequeBasedMessageQueueSemantics x$1)Deprecated.protected ActorRefjournal()Deprecated.java.lang.StringjournalPluginId()Deprecated.Configuration id of the journal plugin servicing this persistent actor.java.lang.StringpersistenceId()Deprecated.Id of the persistent entity for which messages should be replayed.scala.PartialFunction<java.lang.Object,scala.runtime.BoxedUnit>receiveCommand()Deprecated.Command handler.scala.PartialFunction<java.lang.Object,scala.runtime.BoxedUnit>receiveRecover()Deprecated.Recovery handler that receives persisted events during recovery.scala.PartialFunction<java.lang.Object,scala.runtime.BoxedUnit>receiveSnapshotResult()Deprecated.voidsaveSnapshotWhenNeeded()Deprecated.java.lang.StringsnapshotPluginId()Deprecated.Configuration id of the snapshot plugin servicing this persistent actor.protected ActorRefsnapshotStore()Deprecated.Snapshot store plugin actor.java.lang.StringtypeName()Deprecated.protected voidunstashGetShardHomeRequestsForShard(java.lang.String shard)Deprecated.protected voidunstashOneGetShardHomeRequest()Deprecated.<E extends akka.cluster.sharding.ShardCoordinator.Internal.DomainEvent>
 voidupdate(E evt, scala.Function1<E,scala.runtime.BoxedUnit> f)Deprecated.scala.PartialFunction<java.lang.Object,scala.runtime.BoxedUnit>waitingForStateInitialized()Deprecated.- 
Methods inherited from class akka.cluster.sharding.ShardCoordinatoractive, akka$actor$Actor$_setter_$context_$eq, akka$actor$Actor$_setter_$self_$eq, aliveRegions, aliveRegions_$eq, allocateShardHomesForRememberEntities, allRegionsRegistered, allRegionsRegistered_$eq, cluster, context, continueGetShardHome, continueRebalance, gracefulShutdownInProgress, gracefulShutdownInProgress_$eq, handleGetShardHome, hasAllRegionsRegistered, ignoreRef, isMember, leastShardAllocationStrategy, log, minMembers, postStop, preparingForShutdown, preparingForShutdown_$eq, preStart, rebalanceInProgress, rebalanceInProgress_$eq, rebalanceWorkers, rebalanceWorkers_$eq, receiveTerminated, regionProxyTerminated, regionTerminated, regionTerminationInProgress, regionTerminationInProgress_$eq, removalMargin, self, sendHostShardMsg, shutdownShards, shuttingDown, state, state_$eq, stateInitialized, unAckedHostShards, unAckedHostShards_$eq, waitingForLocalRegionToTerminate, waitingForLocalRegionToTerminate_$eq, waitingForShardsToStop, waitingForShardsToStop_$eq, watchStateActors
 - 
Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 - 
Methods inherited from interface akka.actor.Actorakka$actor$Actor$_setter_$context_$eq, akka$actor$Actor$_setter_$self_$eq, context, postRestart, preStart, self, sender, supervisorStrategy
 - 
Methods inherited from interface akka.persistence.Eventsourced_lastSequenceNr_$eq, aroundPostRestart, aroundPostStop, aroundPreRestart, aroundPreStart, aroundReceive, batchAtomicWrite, changeState, currentCommand, currentState_$eq, deleteMessages, eventBatch_$eq, flushBatch, flushJournalBatch, getAndClearInstrumentationContext, instrumentationContexts_$eq, internalDefer, internalDeferAsync, internalDeleteMessagesBeforeSnapshot, internalPersist, internalPersistAll, internalPersistAllAsync, internalPersistAsync, journalBatch_$eq, lastSequenceNr, log, nextSequenceNr, onPersistFailure, onPersistRejected, onRecoveryFailure, onRecoveryFailureAndInstrumentation, onReplaySuccess, peekApplyHandler, pendingStashingPersistInvocations_$eq, recovering, recoveryFinished, recoveryRunning, recoveryStarted, requestRecoveryPermit, sendBatchedEventsToJournal, sequenceNr_$eq, setLastSequenceNr, snapshotSequenceNr, snapshotterId, startRecovery, stash, stashInternally, super$aroundPostRestart, super$aroundPostStop, super$aroundPreRestart, super$aroundPreStart, super$aroundReceive, super$stash, super$unhandled, unhandled, unstashAll, unstashInternally, updateLastSequenceNr, waitingRecoveryPermit, writeEventFailed, writeEventRejected, writeEventSucceeded, writeInProgress_$eq
 - 
Methods inherited from interface akka.persistence.PersistenceRecoveryrecovery
 - 
Methods inherited from interface akka.persistence.PersistenceStashinternalStashOverflowStrategy
 - 
Methods inherited from interface akka.persistence.PersistentActordefer, deferAsync, persist, persistAll, persistAllAsync, persistAsync, receive
 - 
Methods inherited from interface akka.persistence.SnapshotterdeleteSnapshot, deleteSnapshots, loadSnapshot, saveSnapshot
 - 
Methods inherited from interface akka.actor.StashFactorycreateStash
 - 
Methods inherited from interface akka.actor.StashSupportactorCell, clearStash, context, enqueueFirst, prepend, self, theStash_$eq, unstash, unstashAll
 - 
Methods inherited from interface akka.actor.TimersactorCell, aroundPostStop, aroundPreRestart, aroundReceive, super$aroundPostStop, super$aroundPreRestart, super$aroundReceive, timers
 - 
Methods inherited from interface akka.actor.UnrestrictedStashpostStop, preRestart, super$postStop, super$preRestart
 
- 
 
- 
- 
- 
Constructor Detail- 
PersistentShardCoordinatorpublic PersistentShardCoordinator(java.lang.String typeName, ClusterShardingSettings settings, ShardCoordinator.ShardAllocationStrategy allocationStrategy)Deprecated.
 
- 
 - 
Method Detail- 
akka$actor$StashSupport$_setter_$mailbox_$eqprotected void akka$actor$StashSupport$_setter_$mailbox_$eq(DequeBasedMessageQueueSemantics x$1) Deprecated.- Specified by:
- akka$actor$StashSupport$_setter_$mailbox_$eqin interface- StashSupport
 
 - 
journalprotected ActorRef journal() Deprecated.- Specified by:
- journalin interface- Eventsourced
 
 - 
journalPluginIdpublic java.lang.String journalPluginId() Deprecated.Description copied from interface:PersistenceIdentityConfiguration id of the journal plugin servicing this persistent actor. When empty, looks inakka.persistence.journal.pluginto find configuration entry path. When configured, usesjournalPluginIdas absolute path to the journal configuration entry. Configuration entry must contain few required fields, such asclass. Seesrc/main/resources/reference.conf.- Specified by:
- journalPluginIdin interface- PersistenceIdentity
 
 - 
persistenceIdpublic java.lang.String persistenceId() Deprecated.Description copied from interface:PersistenceIdentityId of the persistent entity for which messages should be replayed.- Specified by:
- persistenceIdin interface- PersistenceIdentity
 
 - 
receiveCommandpublic scala.PartialFunction<java.lang.Object,scala.runtime.BoxedUnit> receiveCommand() Deprecated.Description copied from interface:EventsourcedCommand handler. Typically validates commands against current state (and/or by communication with other actors). On successful validation, one or more events are derived from a command and these events are then persisted by callingpersist.- Specified by:
- receiveCommandin interface- Eventsourced
 
 - 
receiveRecoverpublic scala.PartialFunction<java.lang.Object,scala.runtime.BoxedUnit> receiveRecover() Deprecated.Description copied from interface:EventsourcedRecovery handler that receives persisted events during recovery. If a state snapshot has been captured and saved, this handler will receive aSnapshotOffermessage 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. - Specified by:
- receiveRecoverin interface- Eventsourced
- See Also:
- Recovery
 
 - 
receiveSnapshotResultpublic scala.PartialFunction<java.lang.Object,scala.runtime.BoxedUnit> receiveSnapshotResult() Deprecated.
 - 
saveSnapshotWhenNeededpublic void saveSnapshotWhenNeeded() Deprecated.
 - 
snapshotPluginIdpublic java.lang.String snapshotPluginId() Deprecated.Description copied from interface:PersistenceIdentityConfiguration id of the snapshot plugin servicing this persistent actor. When empty, looks inakka.persistence.snapshot-store.pluginto find configuration entry path. When configured, usessnapshotPluginIdas absolute path to the snapshot store configuration entry. Configuration entry must contain few required fields, such asclass. Seesrc/main/resources/reference.conf.- Specified by:
- snapshotPluginIdin interface- PersistenceIdentity
 
 - 
snapshotStoreprotected ActorRef snapshotStore() Deprecated.Description copied from interface:SnapshotterSnapshot store plugin actor.- Specified by:
- snapshotStorein interface- Eventsourced
- Specified by:
- snapshotStorein interface- Snapshotter
 
 - 
typeNamepublic java.lang.String typeName() Deprecated.- Specified by:
- typeNamein class- ShardCoordinator
 
 - 
unstashGetShardHomeRequestsForShardprotected void unstashGetShardHomeRequestsForShard(java.lang.String shard) Deprecated.- Specified by:
- unstashGetShardHomeRequestsForShardin class- ShardCoordinator
 
 - 
unstashOneGetShardHomeRequestprotected void unstashOneGetShardHomeRequest() Deprecated.- Specified by:
- unstashOneGetShardHomeRequestin class- ShardCoordinator
 
 - 
updatepublic <E extends akka.cluster.sharding.ShardCoordinator.Internal.DomainEvent> void update(E evt, scala.Function1<E,scala.runtime.BoxedUnit> f)Deprecated.- Specified by:
- updatein class- ShardCoordinator
 
 - 
waitingForStateInitializedpublic scala.PartialFunction<java.lang.Object,scala.runtime.BoxedUnit> waitingForStateInitialized() Deprecated.
 
- 
 
-