Record Class DesiredBalanceStats

java.lang.Object
java.lang.Record
org.elasticsearch.cluster.routing.allocation.allocator.DesiredBalanceStats
All Implemented Interfaces:
Writeable, ToXContent, ToXContentObject

public record DesiredBalanceStats(long lastConvergedIndex, boolean computationActive, long computationSubmitted, long computationExecuted, long computationConverged, long computationIterations, long computedShardMovements, long cumulativeComputationTime, long cumulativeReconciliationTime, long unassignedShards, long totalAllocations, long undesiredAllocations) extends Record implements Writeable, ToXContentObject
  • Constructor Details

    • DesiredBalanceStats

      public DesiredBalanceStats(long lastConvergedIndex, boolean computationActive, long computationSubmitted, long computationExecuted, long computationConverged, long computationIterations, long computedShardMovements, long cumulativeComputationTime, long cumulativeReconciliationTime, long unassignedShards, long totalAllocations, long undesiredAllocations)
      Creates an instance of a DesiredBalanceStats record class.
      Parameters:
      lastConvergedIndex - the value for the lastConvergedIndex record component
      computationActive - the value for the computationActive record component
      computationSubmitted - the value for the computationSubmitted record component
      computationExecuted - the value for the computationExecuted record component
      computationConverged - the value for the computationConverged record component
      computationIterations - the value for the computationIterations record component
      computedShardMovements - the value for the computedShardMovements record component
      cumulativeComputationTime - the value for the cumulativeComputationTime record component
      cumulativeReconciliationTime - the value for the cumulativeReconciliationTime record component
      unassignedShards - the value for the unassignedShards record component
      totalAllocations - the value for the totalAllocations record component
      undesiredAllocations - the value for the undesiredAllocations record component
  • Method Details

    • readFrom

      public static DesiredBalanceStats readFrom(StreamInput in) throws IOException
      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
    • undesiredAllocationsRatio

      public double undesiredAllocationsRatio()
    • 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. All components in this record class 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.
    • lastConvergedIndex

      public long lastConvergedIndex()
      Returns the value of the lastConvergedIndex record component.
      Returns:
      the value of the lastConvergedIndex record component
    • computationActive

      public boolean computationActive()
      Returns the value of the computationActive record component.
      Returns:
      the value of the computationActive record component
    • computationSubmitted

      public long computationSubmitted()
      Returns the value of the computationSubmitted record component.
      Returns:
      the value of the computationSubmitted record component
    • computationExecuted

      public long computationExecuted()
      Returns the value of the computationExecuted record component.
      Returns:
      the value of the computationExecuted record component
    • computationConverged

      public long computationConverged()
      Returns the value of the computationConverged record component.
      Returns:
      the value of the computationConverged record component
    • computationIterations

      public long computationIterations()
      Returns the value of the computationIterations record component.
      Returns:
      the value of the computationIterations record component
    • computedShardMovements

      public long computedShardMovements()
      Returns the value of the computedShardMovements record component.
      Returns:
      the value of the computedShardMovements record component
    • cumulativeComputationTime

      public long cumulativeComputationTime()
      Returns the value of the cumulativeComputationTime record component.
      Returns:
      the value of the cumulativeComputationTime record component
    • cumulativeReconciliationTime

      public long cumulativeReconciliationTime()
      Returns the value of the cumulativeReconciliationTime record component.
      Returns:
      the value of the cumulativeReconciliationTime record component
    • unassignedShards

      public long unassignedShards()
      Returns the value of the unassignedShards record component.
      Returns:
      the value of the unassignedShards record component
    • totalAllocations

      public long totalAllocations()
      Returns the value of the totalAllocations record component.
      Returns:
      the value of the totalAllocations record component
    • undesiredAllocations

      public long undesiredAllocations()
      Returns the value of the undesiredAllocations record component.
      Returns:
      the value of the undesiredAllocations record component