Class BalancedShardsAllocator.ModelNode

java.lang.Object
org.opensearch.cluster.routing.allocation.allocator.BalancedShardsAllocator.ModelNode
All Implemented Interfaces:
java.lang.Iterable<org.opensearch.cluster.routing.allocation.allocator.BalancedShardsAllocator.ModelIndex>
Enclosing class:
BalancedShardsAllocator

public static class BalancedShardsAllocator.ModelNode
extends java.lang.Object
implements java.lang.Iterable<org.opensearch.cluster.routing.allocation.allocator.BalancedShardsAllocator.ModelIndex>
  • Method Summary

    Modifier and Type Method Description
    void addShard​(ShardRouting shard)  
    boolean containsShard​(ShardRouting shard)  
    org.opensearch.cluster.routing.allocation.allocator.BalancedShardsAllocator.ModelIndex getIndex​(java.lang.String indexId)  
    java.lang.String getNodeId()  
    RoutingNode getRoutingNode()  
    int highestPrimary​(java.lang.String index)  
    java.util.Iterator<org.opensearch.cluster.routing.allocation.allocator.BalancedShardsAllocator.ModelIndex> iterator()  
    int numShards()  
    int numShards​(java.lang.String idx)  
    void removeShard​(ShardRouting shard)  
    java.lang.String toString()  

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface java.lang.Iterable

    forEach, spliterator
  • Method Details

    • getIndex

      public org.opensearch.cluster.routing.allocation.allocator.BalancedShardsAllocator.ModelIndex getIndex​(java.lang.String indexId)
    • getNodeId

      public java.lang.String getNodeId()
    • getRoutingNode

      public RoutingNode getRoutingNode()
    • numShards

      public int numShards()
    • numShards

      public int numShards​(java.lang.String idx)
    • highestPrimary

      public int highestPrimary​(java.lang.String index)
    • addShard

      public void addShard​(ShardRouting shard)
    • removeShard

      public void removeShard​(ShardRouting shard)
    • toString

      public java.lang.String toString()
      Overrides:
      toString in class java.lang.Object
    • iterator

      public java.util.Iterator<org.opensearch.cluster.routing.allocation.allocator.BalancedShardsAllocator.ModelIndex> iterator()
      Specified by:
      iterator in interface java.lang.Iterable<org.opensearch.cluster.routing.allocation.allocator.BalancedShardsAllocator.ModelIndex>
    • containsShard

      public boolean containsShard​(ShardRouting shard)