akka.contrib.pattern
Class ShardCoordinator
java.lang.Object
akka.contrib.pattern.ShardCoordinator
- All Implemented Interfaces:
- Actor, ActorLogging, Stash, StashFactory, StashSupport, UnrestrictedStash, RequiresMessageQueue<DequeBasedMessageQueueSemantics>, Eventsourced, PersistentActor, ProcessorImpl, Recovery, Snapshotter
public class ShardCoordinator
- extends java.lang.Object
- implements PersistentActor, ActorLogging
Singleton coordinator that decides where to allocate shards.
- See Also:
ClusterSharding extension
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface akka.persistence.Eventsourced |
aroundPreRestart, aroundReceive, currentState, defer, defer, flushBatch, initialBehavior, pendingInvocations, pendingStashingPersistInvocations, persist, persist, persistAsync, persistAsync, persistingEvents, preRestart, processingCommands, processorStash, recovering, recoveryBehavior, resequenceableEventBatch, unstashAll, useProcessorBatching |
Methods inherited from interface akka.persistence.ProcessorImpl |
_persistenceId, aroundPostStop, aroundPreStart, deleteMessage, deleteMessage, deleteMessages, deleteMessages, flushJournalBatch, initializing, instanceId, nextSequenceNr, onRecoveryCompleted, onRecoveryFailure, onReplayFailure, onReplaySuccess, preRestartDefault, preStart, processing, processorBatch, processorId, recoveryFinished, recoveryRunning, sequenceNr, snapshotterId, unhandled, unstashFilterPredicate |
Methods inherited from interface akka.persistence.Recovery |
_currentPersistent, _currentState, _lastSequenceNr, _recoveryFailureCause, _recoveryFailureMessage, currentPersistentMessage, extension, getCurrentPersistentMessage, journal, lastSequenceNr, prepareRestart, receiverStash, recoveryPending, recoveryStarted, replayFailed, replayStarted, runReceive, snapshotSequenceNr, updateLastSequenceNr, updateLastSequenceNr, withCurrentPersistent |
Methods inherited from interface akka.actor.StashSupport |
actorCell, capacity, clearStash, context, enqueueFirst, mailbox, prepend, self, stash, theStash, unstash, unstashAll |
ShardCoordinator
public ShardCoordinator(scala.concurrent.duration.FiniteDuration handOffTimeout,
scala.concurrent.duration.FiniteDuration rebalanceInterval,
scala.concurrent.duration.FiniteDuration snapshotInterval,
ShardCoordinator.ShardAllocationStrategy allocationStrategy)
props
public static Props props(scala.concurrent.duration.FiniteDuration handOffTimeout,
scala.concurrent.duration.FiniteDuration rebalanceInterval,
scala.concurrent.duration.FiniteDuration snapshotInterval,
ShardCoordinator.ShardAllocationStrategy allocationStrategy)
- Factory method for the
Props
of the ShardCoordinator
actor.
- Parameters:
handOffTimeout
- (undocumented)rebalanceInterval
- (undocumented)snapshotInterval
- (undocumented)allocationStrategy
- (undocumented)
- Returns:
- (undocumented)
persistenceId
public java.lang.String persistenceId()
- Description copied from interface:
Recovery
- Id of the persistent entity for which messages should be replayed.
- Specified by:
persistenceId
in interface Recovery
- Returns:
- (undocumented)
persistentState
public akka.contrib.pattern.ShardCoordinator.Internal.State persistentState()
rebalanceInProgress
public scala.collection.immutable.Set<java.lang.String> rebalanceInProgress()
rebalanceTask
public Cancellable rebalanceTask()
snapshotTask
public Cancellable snapshotTask()
postStop
public void postStop()
- Description copied from interface:
Actor
- User overridable callback.
Is called asynchronously after 'actor.stop()' is invoked.
Empty default implementation.
- Specified by:
postStop
in interface Actor
- Specified by:
postStop
in interface UnrestrictedStash
- Specified by:
postStop
in interface Eventsourced
receiveRecover
public scala.PartialFunction<java.lang.Object,scala.runtime.BoxedUnit> receiveRecover()
- Specified by:
receiveRecover
in interface Eventsourced
receiveCommand
public scala.PartialFunction<java.lang.Object,scala.runtime.BoxedUnit> receiveCommand()
- Specified by:
receiveCommand
in interface Eventsourced
shuttingDown
public scala.PartialFunction<java.lang.Object,scala.runtime.BoxedUnit> shuttingDown()