Class ClusterShardingImpl

    • Constructor Detail

      • ClusterShardingImpl

        public ClusterShardingImpl​(ActorSystem<?> system)
    • Method Detail

      • entityRefFor

        public <M> EntityRef<M> entityRefFor​(EntityTypeKey<M> typeKey,
                                             java.lang.String entityId)
        Description copied from interface: ClusterSharding
        Create an ActorRef-like reference to a specific sharded entity.

        You have to correctly specify the type of messages the target can handle via the typeKey.

        Messages sent through this EntityRef will be wrapped in a ShardingEnvelope including the here provided entityId.

        For in-depth documentation of its semantics, see EntityRef.

        Specified by:
        entityRefFor in interface ClusterSharding
        Parameters:
        typeKey - (undocumented)
        entityId - (undocumented)
        Returns:
        (undocumented)
      • entityRefFor

        public <M> EntityRef<M> entityRefFor​(EntityTypeKey<M> typeKey,
                                             java.lang.String entityId,
                                             java.lang.String dataCenter)
        Description copied from interface: ClusterSharding
        Create an ActorRef-like reference to a specific sharded entity running in another data center.

        You have to correctly specify the type of messages the target can handle via the typeKey.

        Messages sent through this EntityRef will be wrapped in a ShardingEnvelope including the here provided entityId.

        For in-depth documentation of its semantics, see EntityRef.

        Specified by:
        entityRefFor in interface ClusterSharding
        Parameters:
        typeKey - (undocumented)
        entityId - (undocumented)
        dataCenter - (undocumented)
        Returns:
        (undocumented)
      • entityRefFor

        public <M> EntityRef<M> entityRefFor​(EntityTypeKey<M> typeKey,
                                             java.lang.String entityId)
        Description copied from class: ClusterSharding
        Create an ActorRef-like reference to a specific sharded entity.

        You have to correctly specify the type of messages the target can handle via the typeKey.

        Messages sent through this EntityRef will be wrapped in a ShardingEnvelope including the here provided entityId.

        For in-depth documentation of its semantics, see EntityRef.

        Specified by:
        entityRefFor in class ClusterSharding
        Parameters:
        typeKey - (undocumented)
        entityId - (undocumented)
        Returns:
        (undocumented)
      • entityRefFor

        public <M> EntityRef<M> entityRefFor​(EntityTypeKey<M> typeKey,
                                             java.lang.String entityId,
                                             java.lang.String dataCenter)
        Description copied from class: ClusterSharding
        Create an ActorRef-like reference to a specific sharded entity running in another data center.

        You have to correctly specify the type of messages the target can handle via the typeKey.

        Messages sent through this EntityRef will be wrapped in a ShardingEnvelope including the provided entityId.

        For in-depth documentation of its semantics, see EntityRef.

        Specified by:
        entityRefFor in class ClusterSharding
        Parameters:
        typeKey - (undocumented)
        entityId - (undocumented)
        dataCenter - (undocumented)
        Returns:
        (undocumented)
      • init

        public <M,​E> ActorRef<E> init​(Entity<M,​E> entity)
        Description copied from interface: ClusterSharding
        Initialize sharding for the given entity factory 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:
        init in interface ClusterSharding
        Parameters:
        entity - (undocumented)
        Returns:
        (undocumented)