Package akka.cluster.sharding
Class DDataShardCoordinator
- java.lang.Object
-
- akka.cluster.sharding.ShardCoordinator
-
- akka.cluster.sharding.DDataShardCoordinator
-
- All Implemented Interfaces:
Actor
,ActorLogging
,Stash
,StashSupport
,UnrestrictedStash
,RequiresMessageQueue<DequeBasedMessageQueueSemantics>
public class DDataShardCoordinator extends ShardCoordinator implements Stash
Singleton coordinator (with state based on ddata) that decides where to allocate shards.- See Also:
ClusterSharding extension
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class akka.cluster.sharding.ShardCoordinator
ShardCoordinator.AbstractShardAllocationStrategy, ShardCoordinator.Internal$, ShardCoordinator.LeastShardAllocationStrategy, ShardCoordinator.RebalanceWorker, ShardCoordinator.ShardAllocationStrategy
-
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, boolean rememberEntities)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
activate()
scala.PartialFunction<java.lang.Object,scala.runtime.BoxedUnit>
active()
protected void
akka$actor$StashSupport$_setter_$mailbox_$eq(DequeBasedMessageQueueSemantics x$1)
scala.collection.immutable.Set<Key<ReplicatedData>>
allKeys()
GSetKey<java.lang.String>
AllShardsKey()
LWWRegisterKey<akka.cluster.sharding.ShardCoordinator.Internal.State>
CoordinatorStateKey()
void
getAllShards()
void
getCoordinatorState()
akka.cluster.sharding.ShardCoordinator.Internal.State
initEmptyState()
DequeBasedMessageQueueSemantics
mailbox()
Cluster
node()
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.void
sendAllShardsUpdate(java.lang.String newShard)
void
sendCoordinatorStateUpdate(akka.cluster.sharding.ShardCoordinator.Internal.DomainEvent evt)
scala.collection.immutable.Set<java.lang.String>
shards()
void
shards_$eq(scala.collection.immutable.Set<java.lang.String> x$1)
boolean
terminating()
void
terminating_$eq(boolean x$1)
<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>
waitingForState(scala.collection.immutable.Set<Key<ReplicatedData>> remainingKeys)
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.Function1<E,scala.runtime.BoxedUnit> afterUpdateCallback, scala.collection.immutable.Set<Key<ReplicatedData>> remainingKeys)
-
Methods inherited from class akka.cluster.sharding.ShardCoordinator
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, minMembers, postStop, props, props, rebalanceInProgress, rebalanceInProgress_$eq, rebalanceTask, rebalanceWorkerProps, receiveTerminated, regionProxyTerminated, regionTerminated, regionTerminationInProgress, regionTerminationInProgress_$eq, removalMargin, self, sendHostShardMsg, 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, aroundPostStop, aroundPreRestart, aroundPreStart, aroundReceive, context, postRestart, preStart, self, sender, supervisorStrategy, unhandled
-
Methods inherited from interface akka.actor.ActorLogging
_log_$eq, log
-
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.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, boolean rememberEntities)
-
-
Method Detail
-
AllShardsKey
public GSetKey<java.lang.String> AllShardsKey()
-
CoordinatorStateKey
public LWWRegisterKey<akka.cluster.sharding.ShardCoordinator.Internal.State> CoordinatorStateKey()
-
activate
public void activate()
-
active
public scala.PartialFunction<java.lang.Object,scala.runtime.BoxedUnit> active()
- Overrides:
active
in classShardCoordinator
-
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
-
allKeys
public scala.collection.immutable.Set<Key<ReplicatedData>> allKeys()
-
getAllShards
public void getAllShards()
-
getCoordinatorState
public void getCoordinatorState()
-
initEmptyState
public akka.cluster.sharding.ShardCoordinator.Internal.State initEmptyState()
-
mailbox
public DequeBasedMessageQueueSemantics mailbox()
- Specified by:
mailbox
in interfaceStashSupport
-
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.
-
sendAllShardsUpdate
public void sendAllShardsUpdate(java.lang.String newShard)
-
sendCoordinatorStateUpdate
public void sendCoordinatorStateUpdate(akka.cluster.sharding.ShardCoordinator.Internal.DomainEvent evt)
-
shards
public scala.collection.immutable.Set<java.lang.String> shards()
-
shards_$eq
public void shards_$eq(scala.collection.immutable.Set<java.lang.String> x$1)
-
terminating
public boolean terminating()
-
terminating_$eq
public void terminating_$eq(boolean x$1)
-
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
-
waitingForState
public scala.PartialFunction<java.lang.Object,scala.runtime.BoxedUnit> waitingForState(scala.collection.immutable.Set<Key<ReplicatedData>> remainingKeys)
-
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.Function1<E,scala.runtime.BoxedUnit> afterUpdateCallback, scala.collection.immutable.Set<Key<ReplicatedData>> remainingKeys)
-
-