Module org.elasticsearch.server
Package org.elasticsearch.index.shard
Record Class IndexShard.ShardFailure
java.lang.Object
java.lang.Record
org.elasticsearch.index.shard.IndexShard.ShardFailure
- Enclosing class:
IndexShard
public static record IndexShard.ShardFailure(ShardRouting routing, String reason, Exception cause)
extends Record
Simple struct encapsulating a shard failure
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionShardFailure(ShardRouting routing, String reason, Exception cause) Creates an instance of aShardFailurerecord class. -
Method Summary
Modifier and TypeMethodDescriptioncause()Returns the value of thecauserecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.reason()Returns the value of thereasonrecord component.routing()Returns the value of theroutingrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ShardFailure
Creates an instance of aShardFailurerecord class.- Parameters:
routing- the value for theroutingrecord componentreason- the value for thereasonrecord componentcause- the value for thecauserecord 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. All components in this record class are compared withObjects::equals(Object,Object). -
routing
Returns the value of theroutingrecord component.- Returns:
- the value of the
routingrecord component
-
reason
Returns the value of thereasonrecord component.- Returns:
- the value of the
reasonrecord component
-
cause
Returns the value of thecauserecord component.- Returns:
- the value of the
causerecord component
-