Class ExternalShardAllocationClientImpl

    • Constructor Detail

      • ExternalShardAllocationClientImpl

        public ExternalShardAllocationClientImpl​(ActorSystem system,
                                                 java.lang.String typeName)
    • Method Detail

      • setShardLocation

        public java.util.concurrent.CompletionStage<Done> setShardLocation​(java.lang.String shard,
                                                                           Address location)
        Description copied from interface: ExternalShardAllocationClient
        Update the given shard's location. The Address should match one of the nodes in the cluster. If the node has not joined the cluster yet it will be moved to that node after the first cluster sharding rebalance.

        Specified by:
        setShardLocation in interface ExternalShardAllocationClient
        Parameters:
        shard - The shard identifier
        location - Location (akka node) to allocate the shard to
        Returns:
        Confirmation that the update has been propagated to a majority of cluster nodes
      • updateShardLocation

        public scala.concurrent.Future<Done> updateShardLocation​(java.lang.String shard,
                                                                 Address location)
        Description copied from interface: ExternalShardAllocationClient
        Update the given shard's location. The Address should match one of the nodes in the cluster. If the node has not joined the cluster yet it will be moved to that node after the first cluster sharding rebalance.

        Specified by:
        updateShardLocation in interface ExternalShardAllocationClient
        Parameters:
        shard - The shard identifier
        location - Location (akka node) to allocate the shard to
        Returns:
        Confirmation that the update has been propagated to a majority of cluster nodes