Record Class DesiredBalanceResponse.ShardView

java.lang.Object
java.lang.Record
org.elasticsearch.action.admin.cluster.allocation.DesiredBalanceResponse.ShardView
All Implemented Interfaces:
Writeable, ToXContent, ToXContentObject
Enclosing class:
DesiredBalanceResponse

public static record DesiredBalanceResponse.ShardView(ShardRoutingState state, boolean primary, String node, boolean nodeIsDesired, String relocatingNode, Boolean relocatingNodeIsDesired, int shardId, String index, Double forecastWriteLoad, Long forecastShardSizeInBytes, List<String> tierPreference) extends Record implements Writeable, ToXContentObject
  • Constructor Details

    • ShardView

      public ShardView(ShardRoutingState state, boolean primary, String node, boolean nodeIsDesired, @Nullable String relocatingNode, @Nullable Boolean relocatingNodeIsDesired, int shardId, String index, @Nullable Double forecastWriteLoad, @Nullable Long forecastShardSizeInBytes, List<String> tierPreference)
      Creates an instance of a ShardView record class.
      Parameters:
      state - the value for the state record component
      primary - the value for the primary record component
      node - the value for the node record component
      nodeIsDesired - the value for the nodeIsDesired record component
      relocatingNode - the value for the relocatingNode record component
      relocatingNodeIsDesired - the value for the relocatingNodeIsDesired record component
      shardId - the value for the shardId record component
      index - the value for the index record component
      forecastWriteLoad - the value for the forecastWriteLoad record component
      forecastShardSizeInBytes - the value for the forecastShardSizeInBytes record component
      tierPreference - the value for the tierPreference record component
  • Method Details

    • from

      Throws:
      IOException
    • writeTo

      public void writeTo(StreamOutput out) throws IOException
      Description copied from interface: Writeable
      Write this into the StreamOutput.
      Specified by:
      writeTo in interface Writeable
      Throws:
      IOException
    • toXContent

      public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws IOException
      Specified by:
      toXContent in interface ToXContent
      Throws:
      IOException
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • state

      public ShardRoutingState state()
      Returns the value of the state record component.
      Returns:
      the value of the state record component
    • primary

      public boolean primary()
      Returns the value of the primary record component.
      Returns:
      the value of the primary record component
    • node

      public String node()
      Returns the value of the node record component.
      Returns:
      the value of the node record component
    • nodeIsDesired

      public boolean nodeIsDesired()
      Returns the value of the nodeIsDesired record component.
      Returns:
      the value of the nodeIsDesired record component
    • relocatingNode

      @Nullable public String relocatingNode()
      Returns the value of the relocatingNode record component.
      Returns:
      the value of the relocatingNode record component
    • relocatingNodeIsDesired

      @Nullable public Boolean relocatingNodeIsDesired()
      Returns the value of the relocatingNodeIsDesired record component.
      Returns:
      the value of the relocatingNodeIsDesired record component
    • shardId

      public int shardId()
      Returns the value of the shardId record component.
      Returns:
      the value of the shardId record component
    • index

      public String index()
      Returns the value of the index record component.
      Returns:
      the value of the index record component
    • forecastWriteLoad

      @Nullable public Double forecastWriteLoad()
      Returns the value of the forecastWriteLoad record component.
      Returns:
      the value of the forecastWriteLoad record component
    • forecastShardSizeInBytes

      @Nullable public Long forecastShardSizeInBytes()
      Returns the value of the forecastShardSizeInBytes record component.
      Returns:
      the value of the forecastShardSizeInBytes record component
    • tierPreference

      public List<String> tierPreference()
      Returns the value of the tierPreference record component.
      Returns:
      the value of the tierPreference record component