Module org.elasticsearch.server
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
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.xcontent.ToXContent
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.ParamsNested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V> -
Field Summary
Fields inherited from interface org.elasticsearch.xcontent.ToXContent
EMPTY, EMPTY_PARAMS -
Constructor Summary
ConstructorsConstructorDescriptionDesiredBalanceStats(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 aDesiredBalanceStatsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the value of thecomputationActiverecord component.longReturns the value of thecomputationConvergedrecord component.longReturns the value of thecomputationExecutedrecord component.longReturns the value of thecomputationIterationsrecord component.longReturns the value of thecomputationSubmittedrecord component.longReturns the value of thecomputedShardMovementsrecord component.longReturns the value of thecumulativeComputationTimerecord component.longReturns the value of thecumulativeReconciliationTimerecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.longReturns the value of thelastConvergedIndexrecord component.static DesiredBalanceStatsreadFrom(StreamInput in) final StringtoString()Returns a string representation of this record class.longReturns the value of thetotalAllocationsrecord component.toXContent(XContentBuilder builder, ToXContent.Params params) longReturns the value of theunassignedShardsrecord component.longReturns the value of theundesiredAllocationsrecord component.doublevoidwriteTo(StreamOutput out) Write this into the StreamOutput.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.elasticsearch.xcontent.ToXContentObject
isFragment
-
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 aDesiredBalanceStatsrecord class.- Parameters:
lastConvergedIndex- the value for thelastConvergedIndexrecord componentcomputationActive- the value for thecomputationActiverecord componentcomputationSubmitted- the value for thecomputationSubmittedrecord componentcomputationExecuted- the value for thecomputationExecutedrecord componentcomputationConverged- the value for thecomputationConvergedrecord componentcomputationIterations- the value for thecomputationIterationsrecord componentcomputedShardMovements- the value for thecomputedShardMovementsrecord componentcumulativeComputationTime- the value for thecumulativeComputationTimerecord componentcumulativeReconciliationTime- the value for thecumulativeReconciliationTimerecord componentunassignedShards- the value for theunassignedShardsrecord componenttotalAllocations- the value for thetotalAllocationsrecord componentundesiredAllocations- the value for theundesiredAllocationsrecord component
-
-
Method Details
-
readFrom
- Throws:
IOException
-
writeTo
Description copied from interface:WriteableWrite this into the StreamOutput.- Specified by:
writeToin interfaceWriteable- Throws:
IOException
-
toXContent
public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws IOException - Specified by:
toXContentin interfaceToXContent- Throws:
IOException
-
undesiredAllocationsRatio
public double undesiredAllocationsRatio() -
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. -
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. -
equals
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 '=='. -
lastConvergedIndex
public long lastConvergedIndex()Returns the value of thelastConvergedIndexrecord component.- Returns:
- the value of the
lastConvergedIndexrecord component
-
computationActive
public boolean computationActive()Returns the value of thecomputationActiverecord component.- Returns:
- the value of the
computationActiverecord component
-
computationSubmitted
public long computationSubmitted()Returns the value of thecomputationSubmittedrecord component.- Returns:
- the value of the
computationSubmittedrecord component
-
computationExecuted
public long computationExecuted()Returns the value of thecomputationExecutedrecord component.- Returns:
- the value of the
computationExecutedrecord component
-
computationConverged
public long computationConverged()Returns the value of thecomputationConvergedrecord component.- Returns:
- the value of the
computationConvergedrecord component
-
computationIterations
public long computationIterations()Returns the value of thecomputationIterationsrecord component.- Returns:
- the value of the
computationIterationsrecord component
-
computedShardMovements
public long computedShardMovements()Returns the value of thecomputedShardMovementsrecord component.- Returns:
- the value of the
computedShardMovementsrecord component
-
cumulativeComputationTime
public long cumulativeComputationTime()Returns the value of thecumulativeComputationTimerecord component.- Returns:
- the value of the
cumulativeComputationTimerecord component
-
cumulativeReconciliationTime
public long cumulativeReconciliationTime()Returns the value of thecumulativeReconciliationTimerecord component.- Returns:
- the value of the
cumulativeReconciliationTimerecord component
-
unassignedShards
public long unassignedShards()Returns the value of theunassignedShardsrecord component.- Returns:
- the value of the
unassignedShardsrecord component
-
totalAllocations
public long totalAllocations()Returns the value of thetotalAllocationsrecord component.- Returns:
- the value of the
totalAllocationsrecord component
-
undesiredAllocations
public long undesiredAllocations()Returns the value of theundesiredAllocationsrecord component.- Returns:
- the value of the
undesiredAllocationsrecord component
-