Module org.elasticsearch.server
Record Class DesiredBalanceInput
java.lang.Object
java.lang.Record
org.elasticsearch.cluster.routing.allocation.allocator.DesiredBalanceInput
- Record Components:
index- EachDesiredBalanceInputcomes from a call toreroute()by a cluster state update, so they arrive in sequence and newer inputs should supersede older ones. Theindexof the input is its position in this sequence.routingAllocation- a copy of (the immutable parts of) the context for the allocation decision processignoredShards- a list of the shards for which earlier allocators have claimed responsibility
public record DesiredBalanceInput(long index, RoutingAllocation routingAllocation, List<ShardRouting> ignoredShards)
extends Record
The input to the desired balance computation.
-
Constructor Summary
ConstructorsConstructorDescriptionDesiredBalanceInput(long index, RoutingAllocation routingAllocation, List<ShardRouting> ignoredShards) Creates an instance of aDesiredBalanceInputrecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic DesiredBalanceInputcreate(long index, RoutingAllocation routingAllocation) final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of theignoredShardsrecord component.longindex()Returns the value of theindexrecord component.Returns the value of theroutingAllocationrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
DesiredBalanceInput
public DesiredBalanceInput(long index, RoutingAllocation routingAllocation, List<ShardRouting> ignoredShards) Creates an instance of aDesiredBalanceInputrecord class.- Parameters:
index- the value for theindexrecord componentroutingAllocation- the value for theroutingAllocationrecord componentignoredShards- the value for theignoredShardsrecord component
-
-
Method Details
-
create
-
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 '=='. -
index
public long index()Returns the value of theindexrecord component.- Returns:
- the value of the
indexrecord component
-
routingAllocation
Returns the value of theroutingAllocationrecord component.- Returns:
- the value of the
routingAllocationrecord component
-
ignoredShards
Returns the value of theignoredShardsrecord component.- Returns:
- the value of the
ignoredShardsrecord component
-