Module org.elasticsearch.server
Package org.elasticsearch.cluster
Record Class ClusterInfo.ReservedSpace
java.lang.Object
java.lang.Record
org.elasticsearch.cluster.ClusterInfo.ReservedSpace
- All Implemented Interfaces:
Writeable
- Enclosing class:
ClusterInfo
public static record ClusterInfo.ReservedSpace(long total, Set<ShardId> shardIds)
extends Record
implements Writeable
Represents the total amount of "reserved" space on a particular data path, together with the set of shards considered.
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V> -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionReservedSpace(long total, Set<ShardId> shardIds) Creates an instance of aReservedSpacerecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleancontainsShardId(ShardId shardId) final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.shardIds()Returns the value of theshardIdsrecord component.final StringtoString()Returns a string representation of this record class.longtotal()Returns the value of thetotalrecord component.voidwriteTo(StreamOutput out) Write this into the StreamOutput.
-
Field Details
-
EMPTY
-
-
Constructor Details
-
ReservedSpace
Creates an instance of aReservedSpacerecord class.- Parameters:
total- the value for thetotalrecord componentshardIds- the value for theshardIdsrecord component
-
-
Method Details
-
writeTo
Description copied from interface:WriteableWrite this into the StreamOutput.- Specified by:
writeToin interfaceWriteable- Throws:
IOException
-
containsShardId
-
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 '=='. -
total
public long total()Returns the value of thetotalrecord component.- Returns:
- the value of the
totalrecord component
-
shardIds
Returns the value of theshardIdsrecord component.- Returns:
- the value of the
shardIdsrecord component
-