Package akka.cluster.sharding
Class DDataShardCoordinator
- java.lang.Object
-
- akka.cluster.sharding.ShardCoordinator
-
- akka.cluster.sharding.DDataShardCoordinator
-
- All Implemented Interfaces:
Actor
,Stash
,StashSupport
,Timers
,UnrestrictedStash
,RequiresMessageQueue<DequeBasedMessageQueueSemantics>
public class DDataShardCoordinator extends ShardCoordinator implements Stash, Timers
INTERNAL API Singleton coordinator (with state based on ddata) that decides where to allocate shards.The plan is for this to be the only type of ShardCoordinator. A full cluster shutdown will rely on remembered entities to re-initialize and reallocate the existing shards.
- See Also:
ClusterSharding extension
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class akka.cluster.sharding.ShardCoordinator
ShardCoordinator.AbstractShardAllocationStrategy, ShardCoordinator.ActorSystemDependentAllocationStrategy, ShardCoordinator.Internal$, ShardCoordinator.LeastShardAllocationStrategy, ShardCoordinator.RebalanceWorker, ShardCoordinator.RebalanceWorker$, ShardCoordinator.ShardAllocationStrategy, ShardCoordinator.ShardAllocationStrategy$, ShardCoordinator.StartableAllocationStrategy
-
Nested classes/interfaces inherited from interface akka.actor.Actor
Actor.emptyBehavior$, Actor.ignoringBehavior$
-
-
Constructor Summary
Constructors Constructor Description DDataShardCoordinator(java.lang.String typeName, ClusterShardingSettings settings, ShardCoordinator.ShardAllocationStrategy allocationStrategy, ActorRef replicator, int majorityMinCap, scala.Option<RememberEntitiesProvider> rememberEntitiesStoreProvider)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
activate()
protected void
akka$actor$StashSupport$_setter_$mailbox_$eq(DequeBasedMessageQueueSemantics x$1)
void
getAllRememberedShards()
void
getCoordinatorState()
DequeBasedMessageQueueSemantics
mailbox()
Cluster
node()
void
onRememberEntitiesStoreStopped()
void
onRememberEntitiesUpdateFailed(java.lang.String shardId)
scala.PartialFunction<java.lang.Object,scala.runtime.BoxedUnit>
receive()
Scala API: This defines the initial actor behavior, it must return a partial function with the actor logic.scala.PartialFunction<java.lang.Object,scala.runtime.BoxedUnit>
receiveLateRememberedEntities()
scala.PartialFunction<java.lang.Object,scala.runtime.BoxedUnit>
receiveTerminated()
void
rememberShardAllocated(java.lang.String newShard)
void
sendCoordinatorStateUpdate(akka.cluster.sharding.ShardCoordinator.Internal.DomainEvent evt)
java.lang.String
typeName()
protected void
unstashOneGetShardHomeRequest()
<E extends akka.cluster.sharding.ShardCoordinator.Internal.DomainEvent>
voidupdate(E evt, scala.Function1<E,scala.runtime.BoxedUnit> f)
scala.PartialFunction<java.lang.Object,scala.runtime.BoxedUnit>
waitingForInitialState(scala.collection.immutable.Set<java.lang.String> rememberedShards)
scala.PartialFunction<java.lang.Object,scala.runtime.BoxedUnit>
waitingForStateInitialized()
<E extends akka.cluster.sharding.ShardCoordinator.Internal.DomainEvent>
scala.PartialFunction<java.lang.Object,scala.runtime.BoxedUnit>waitingForUpdate(E evt, scala.Option<java.lang.String> shardId, boolean waitingForStateWrite, boolean waitingForRememberShard, scala.Function1<E,scala.runtime.BoxedUnit> afterUpdateCallback)
-
Methods inherited from class akka.cluster.sharding.ShardCoordinator
active, 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, isMember, leastShardAllocationStrategy, log, minMembers, postStop, preparingForShutdown, preparingForShutdown_$eq, preStart, props, props, rebalanceInProgress, rebalanceInProgress_$eq, rebalanceWorkerProps, rebalanceWorkers, rebalanceWorkers_$eq, regionProxyTerminated, regionTerminated, regionTerminationInProgress, regionTerminationInProgress_$eq, removalMargin, self, sendHostShardMsg, shutdownShards, shuttingDown, state, state_$eq, stateInitialized, unAckedHostShards, unAckedHostShards_$eq, watchStateActors
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface akka.actor.Actor
akka$actor$Actor$_setter_$context_$eq, akka$actor$Actor$_setter_$self_$eq, aroundPostRestart, aroundPreStart, context, postRestart, preStart, self, sender, supervisorStrategy, unhandled
-
Methods inherited from interface akka.actor.StashSupport
actorCell, clearStash, context, enqueueFirst, prepend, self, stash, theStash_$eq, unstash, unstashAll, unstashAll
-
Methods inherited from interface akka.actor.Timers
actorCell, aroundPostStop, aroundPreRestart, aroundReceive, super$aroundPostStop, super$aroundPreRestart, super$aroundReceive, timers
-
Methods inherited from interface akka.actor.UnrestrictedStash
postStop, preRestart, super$postStop, super$preRestart
-
-
-
-
Constructor Detail
-
DDataShardCoordinator
public DDataShardCoordinator(java.lang.String typeName, ClusterShardingSettings settings, ShardCoordinator.ShardAllocationStrategy allocationStrategy, ActorRef replicator, int majorityMinCap, scala.Option<RememberEntitiesProvider> rememberEntitiesStoreProvider)
-
-
Method Detail
-
mailbox
public DequeBasedMessageQueueSemantics mailbox()
- Specified by:
mailbox
in interfaceStashSupport
-
akka$actor$StashSupport$_setter_$mailbox_$eq
protected void akka$actor$StashSupport$_setter_$mailbox_$eq(DequeBasedMessageQueueSemantics x$1)
- Specified by:
akka$actor$StashSupport$_setter_$mailbox_$eq
in interfaceStashSupport
-
typeName
public java.lang.String typeName()
- Specified by:
typeName
in classShardCoordinator
-
node
public Cluster node()
-
receive
public scala.PartialFunction<java.lang.Object,scala.runtime.BoxedUnit> receive()
Description copied from interface:Actor
Scala API: This defines the initial actor behavior, it must return a partial function with the actor logic.
-
waitingForInitialState
public scala.PartialFunction<java.lang.Object,scala.runtime.BoxedUnit> waitingForInitialState(scala.collection.immutable.Set<java.lang.String> rememberedShards)
-
waitingForStateInitialized
public scala.PartialFunction<java.lang.Object,scala.runtime.BoxedUnit> waitingForStateInitialized()
-
waitingForUpdate
public <E extends akka.cluster.sharding.ShardCoordinator.Internal.DomainEvent> scala.PartialFunction<java.lang.Object,scala.runtime.BoxedUnit> waitingForUpdate(E evt, scala.Option<java.lang.String> shardId, boolean waitingForStateWrite, boolean waitingForRememberShard, scala.Function1<E,scala.runtime.BoxedUnit> afterUpdateCallback)
-
unstashOneGetShardHomeRequest
protected void unstashOneGetShardHomeRequest()
- Specified by:
unstashOneGetShardHomeRequest
in classShardCoordinator
-
activate
public void activate()
-
receiveLateRememberedEntities
public scala.PartialFunction<java.lang.Object,scala.runtime.BoxedUnit> receiveLateRememberedEntities()
-
update
public <E extends akka.cluster.sharding.ShardCoordinator.Internal.DomainEvent> void update(E evt, scala.Function1<E,scala.runtime.BoxedUnit> f)
- Specified by:
update
in classShardCoordinator
-
getCoordinatorState
public void getCoordinatorState()
-
getAllRememberedShards
public void getAllRememberedShards()
-
sendCoordinatorStateUpdate
public void sendCoordinatorStateUpdate(akka.cluster.sharding.ShardCoordinator.Internal.DomainEvent evt)
-
rememberShardAllocated
public void rememberShardAllocated(java.lang.String newShard)
-
receiveTerminated
public scala.PartialFunction<java.lang.Object,scala.runtime.BoxedUnit> receiveTerminated()
- Overrides:
receiveTerminated
in classShardCoordinator
-
onRememberEntitiesUpdateFailed
public void onRememberEntitiesUpdateFailed(java.lang.String shardId)
-
onRememberEntitiesStoreStopped
public void onRememberEntitiesStoreStopped()
-
-