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
ConstructorsConstructorDescriptionFailedShard(ShardRouting routingEntry, String message, Exception failure, boolean markAsStale) Creates an instance of aFailedShardrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.failure()Returns the value of thefailurerecord component.final inthashCode()Returns a hash code value for this object.booleanReturns the value of themarkAsStalerecord component.message()Returns the value of themessagerecord component.Returns the value of theroutingEntryrecord component.final StringtoString()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 aFailedShardrecord class.- Parameters:
routingEntry- the value for theroutingEntryrecord componentmessage- the value for themessagerecord componentfailure- the value for thefailurerecord componentmarkAsStale- the value for themarkAsStalerecord 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 theroutingEntryrecord component.- Returns:
- the value of the
routingEntryrecord component
-
message
Returns the value of themessagerecord component.- Returns:
- the value of the
messagerecord component
-
failure
Returns the value of thefailurerecord component.- Returns:
- the value of the
failurerecord component
-
markAsStale
public boolean markAsStale()Returns the value of themarkAsStalerecord component.- Returns:
- the value of the
markAsStalerecord component
-