Module org.elasticsearch.server
Record Class DesiredBalanceResponse.ShardAssignmentView
java.lang.Object
java.lang.Record
org.elasticsearch.action.admin.cluster.allocation.DesiredBalanceResponse.ShardAssignmentView
- All Implemented Interfaces:
Writeable,ToXContent,ToXContentObject
- Enclosing class:
DesiredBalanceResponse
public static record DesiredBalanceResponse.ShardAssignmentView(Set<String> nodeIds, int total, int unassigned, int ignored)
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
FieldsFields inherited from interface org.elasticsearch.xcontent.ToXContent
EMPTY_PARAMS -
Constructor Summary
ConstructorsConstructorDescriptionShardAssignmentView(Set<String> nodeIds, int total, int unassigned, int ignored) Creates an instance of aShardAssignmentViewrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.from(StreamInput in) final inthashCode()Returns a hash code value for this object.intignored()Returns the value of theignoredrecord component.nodeIds()Returns the value of thenodeIdsrecord component.final StringtoString()Returns a string representation of this record class.inttotal()Returns the value of thetotalrecord component.toXContent(XContentBuilder builder, ToXContent.Params params) intReturns the value of theunassignedrecord 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
-
Field Details
-
EMPTY
-
-
Constructor Details
-
ShardAssignmentView
Creates an instance of aShardAssignmentViewrecord class.- Parameters:
nodeIds- the value for thenodeIdsrecord componenttotal- the value for thetotalrecord componentunassigned- the value for theunassignedrecord componentignored- the value for theignoredrecord component
-
-
Method Details
-
from
- 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 '=='. -
nodeIds
Returns the value of thenodeIdsrecord component.- Returns:
- the value of the
nodeIdsrecord component
-
total
public int total()Returns the value of thetotalrecord component.- Returns:
- the value of the
totalrecord component
-
unassigned
public int unassigned()Returns the value of theunassignedrecord component.- Returns:
- the value of the
unassignedrecord component
-
ignored
public int ignored()Returns the value of theignoredrecord component.- Returns:
- the value of the
ignoredrecord component
-