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 aReservedSpace
record class. -
Method Summary
Modifier and TypeMethodDescriptionboolean
containsShardId
(ShardId shardId) final boolean
Indicates whether some other object is "equal to" this one.long
getTotal()
final int
hashCode()
Returns a hash code value for this object.shardIds()
Returns the value of theshardIds
record component.final String
toString()
Returns a string representation of this record class.long
total()
Returns the value of thetotal
record component.void
writeTo
(StreamOutput out) Write this into the StreamOutput.
-
Field Details
-
EMPTY
-
-
Constructor Details
-
ReservedSpace
Creates an instance of aReservedSpace
record class.- Parameters:
total
- the value for thetotal
record componentshardIds
- the value for theshardIds
record component
-
-
Method Details
-
writeTo
Description copied from interface:Writeable
Write this into the StreamOutput.- Specified by:
writeTo
in interfaceWriteable
- Throws:
IOException
-
getTotal
public long getTotal() -
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 thetotal
record component.- Returns:
- the value of the
total
record component
-
shardIds
Returns the value of theshardIds
record component.- Returns:
- the value of the
shardIds
record component
-