public interface BalancingWeights
The cluster nodes and shards are partitioned into mutually disjoint partitions. Each partition has its own WeightFunction.
  • Method Details

    • weightFunctionForShard

      WeightFunction weightFunctionForShard(ShardRouting shard)
      Get the weight function for the partition to which this shard belongs
      Parameters:
      shard - The shard
      Returns:
      The weight function that applies to the partition that shard belongs to
    • weightFunctionForNode

      WeightFunction weightFunctionForNode(RoutingNode node)
      Get the weight function for the partition to which this node belongs
      Parameters:
      node - The node
      Returns:
      The weight function that applies to the partition that node belongs to
    • createNodeSorters

      Create the node sorters for the cluster
      Parameters:
      modelNodes - The full set of cluster nodes
      balancer - The balancer
      Returns:
      a NodeSorters instance