Class ClusterShardingImpl
- java.lang.Object
-
- akka.cluster.sharding.typed.javadsl.ClusterSharding
-
- akka.cluster.sharding.typed.internal.ClusterShardingImpl
-
- All Implemented Interfaces:
Extension,ClusterSharding
public final class ClusterShardingImpl extends ClusterSharding implements ClusterSharding
INTERNAL API
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class akka.cluster.sharding.typed.javadsl.ClusterSharding
ClusterSharding.Passivate<M>, ClusterSharding.Passivate$, ClusterSharding.ShardCommand
-
Nested classes/interfaces inherited from interface akka.cluster.sharding.typed.scaladsl.ClusterSharding
ClusterSharding.Passivate<M>, ClusterSharding.Passivate$, ClusterSharding.ShardCommand
-
-
Constructor Summary
Constructors Constructor Description ClusterShardingImpl(ActorSystem<?> system)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ShardCoordinator.ShardAllocationStrategydefaultShardAllocationStrategy(ClusterShardingSettings settings)The default is currentlyShardCoordinator.LeastShardAllocationStrategywith the givensettings.<M> EntityRef<M>entityRefFor(EntityTypeKey<M> typeKey, java.lang.String entityId)Create anActorRef-like reference to a specific sharded entity.<M> EntityRef<M>entityRefFor(EntityTypeKey<M> typeKey, java.lang.String entityId)Create anActorRef-like reference to a specific sharded entity.<M,E>
ActorRef<E>init(Entity<M,E> entity)<M,E>
ActorRef<E>init(Entity<M,E> entity)Initialize sharding for the givenentityfactory settings.ActorRef<ClusterShardingQuery>shardState()Actor for querying Cluster Sharding state-
Methods inherited from class akka.cluster.sharding.typed.javadsl.ClusterSharding
get
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface akka.cluster.sharding.typed.scaladsl.ClusterSharding
asJava
-
-
-
-
Constructor Detail
-
ClusterShardingImpl
public ClusterShardingImpl(ActorSystem<?> system)
-
-
Method Detail
-
defaultShardAllocationStrategy
public ShardCoordinator.ShardAllocationStrategy defaultShardAllocationStrategy(ClusterShardingSettings settings)
Description copied from class:ClusterShardingThe default is currentlyShardCoordinator.LeastShardAllocationStrategywith the givensettings. This could be changed in the future.- Specified by:
defaultShardAllocationStrategyin interfaceClusterSharding- Specified by:
defaultShardAllocationStrategyin classClusterSharding- Parameters:
settings- (undocumented)- Returns:
- (undocumented)
-
entityRefFor
public <M> EntityRef<M> entityRefFor(EntityTypeKey<M> typeKey, java.lang.String entityId)
Description copied from interface:ClusterShardingCreate anActorRef-like reference to a specific sharded entity. Currently you have to correctly specify the type of messages the target can handle.Messages sent through this
EntityRefwill be wrapped in aShardingEnvelopeincluding the here providedentityId.For in-depth documentation of its semantics, see
EntityRef.- Specified by:
entityRefForin interfaceClusterSharding- Parameters:
typeKey- (undocumented)entityId- (undocumented)- Returns:
- (undocumented)
-
entityRefFor
public <M> EntityRef<M> entityRefFor(EntityTypeKey<M> typeKey, java.lang.String entityId)
Description copied from class:ClusterShardingCreate anActorRef-like reference to a specific sharded entity. Currently you have to correctly specify the type of messages the target can handle.Messages sent through this
EntityRefwill be wrapped in aShardingEnvelopeincluding the here providedentityId.For in-depth documentation of its semantics, see
EntityRef.- Specified by:
entityRefForin classClusterSharding- Parameters:
typeKey- (undocumented)entityId- (undocumented)- Returns:
- (undocumented)
-
init
public <M,E> ActorRef<E> init(Entity<M,E> entity)
Description copied from interface:ClusterShardingInitialize sharding for the givenentityfactory settings.It will start a shard region or a proxy depending on if the settings require role and if this node has such a role.
- Specified by:
initin interfaceClusterSharding- Parameters:
entity- (undocumented)- Returns:
- (undocumented)
-
init
public <M,E> ActorRef<E> init(Entity<M,E> entity)
- Specified by:
initin classClusterSharding
-
shardState
public ActorRef<ClusterShardingQuery> shardState()
Description copied from class:ClusterShardingActor for querying Cluster Sharding state- Specified by:
shardStatein interfaceClusterSharding- Specified by:
shardStatein classClusterSharding- Returns:
- (undocumented)
-
-