Module org.elasticsearch.server
Record Class ClusterBalanceStats.NodeBalanceStats
java.lang.Object
java.lang.Record
org.elasticsearch.cluster.routing.allocation.allocator.ClusterBalanceStats.NodeBalanceStats
- All Implemented Interfaces:
Writeable,ToXContent,ToXContentObject
- Enclosing class:
ClusterBalanceStats
-
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
ConstructorsConstructorDescriptionNodeBalanceStats(String nodeId, List<String> roles, int shards, int undesiredShardAllocations, double forecastWriteLoad, long forecastShardSize, long actualShardSize, Double nodeWeight) Creates an instance of aNodeBalanceStatsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionlongReturns the value of theactualShardSizerecord component.final booleanIndicates whether some other object is "equal to" this one.longReturns the value of theforecastShardSizerecord component.doubleReturns the value of theforecastWriteLoadrecord component.final inthashCode()Returns a hash code value for this object.nodeId()Returns the value of thenodeIdrecord component.Returns the value of thenodeWeightrecord component.readFrom(StreamInput in) roles()Returns the value of therolesrecord component.intshards()Returns the value of theshardsrecord component.final StringtoString()Returns a string representation of this record class.toXContent(XContentBuilder builder, ToXContent.Params params) intReturns the value of theundesiredShardAllocationsrecord component.voidwriteTo(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
-
NodeBalanceStats
public NodeBalanceStats(String nodeId, List<String> roles, int shards, int undesiredShardAllocations, double forecastWriteLoad, long forecastShardSize, long actualShardSize, Double nodeWeight) Creates an instance of aNodeBalanceStatsrecord class.- Parameters:
nodeId- the value for thenodeIdrecord componentroles- the value for therolesrecord componentshards- the value for theshardsrecord componentundesiredShardAllocations- the value for theundesiredShardAllocationsrecord componentforecastWriteLoad- the value for theforecastWriteLoadrecord componentforecastShardSize- the value for theforecastShardSizerecord componentactualShardSize- the value for theactualShardSizerecord componentnodeWeight- the value for thenodeWeightrecord 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
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
nodeId
Returns the value of thenodeIdrecord component.- Returns:
- the value of the
nodeIdrecord component
-
roles
Returns the value of therolesrecord component.- Returns:
- the value of the
rolesrecord component
-
shards
public int shards()Returns the value of theshardsrecord component.- Returns:
- the value of the
shardsrecord component
-
undesiredShardAllocations
public int undesiredShardAllocations()Returns the value of theundesiredShardAllocationsrecord component.- Returns:
- the value of the
undesiredShardAllocationsrecord component
-
forecastWriteLoad
public double forecastWriteLoad()Returns the value of theforecastWriteLoadrecord component.- Returns:
- the value of the
forecastWriteLoadrecord component
-
forecastShardSize
public long forecastShardSize()Returns the value of theforecastShardSizerecord component.- Returns:
- the value of the
forecastShardSizerecord component
-
actualShardSize
public long actualShardSize()Returns the value of theactualShardSizerecord component.- Returns:
- the value of the
actualShardSizerecord component
-
nodeWeight
Returns the value of thenodeWeightrecord component.- Returns:
- the value of the
nodeWeightrecord component
-