Module org.elasticsearch.server
Record Class FailedShard
java.lang.Object
java.lang.Record
org.elasticsearch.cluster.routing.allocation.FailedShard
public record FailedShard(ShardRouting routingEntry, String message, Exception failure, boolean markAsStale)
extends Record
A class representing a failed shard.
-
Constructor Summary
ConstructorDescriptionFailedShard
(ShardRouting routingEntry, String message, Exception failure, boolean markAsStale) Creates an instance of aFailedShard
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.failure()
Returns the value of thefailure
record component.final int
hashCode()
Returns a hash code value for this object.boolean
Returns the value of themarkAsStale
record component.message()
Returns the value of themessage
record component.Returns the value of theroutingEntry
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
FailedShard
public FailedShard(ShardRouting routingEntry, String message, Exception failure, boolean markAsStale) Creates an instance of aFailedShard
record class.- Parameters:
routingEntry
- the value for theroutingEntry
record componentmessage
- the value for themessage
record componentfailure
- the value for thefailure
record componentmarkAsStale
- the value for themarkAsStale
record component
-
-
Method Details
-
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 '=='. -
routingEntry
Returns the value of theroutingEntry
record component.- Returns:
- the value of the
routingEntry
record component
-
message
Returns the value of themessage
record component.- Returns:
- the value of the
message
record component
-
failure
Returns the value of thefailure
record component.- Returns:
- the value of the
failure
record component
-
markAsStale
public boolean markAsStale()Returns the value of themarkAsStale
record component.- Returns:
- the value of the
markAsStale
record component
-