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
-
Constructor Summary
ConstructorDescriptionShardFailure
(ShardRouting routing, String reason, Exception cause) Creates an instance of aShardFailure
record class. -
Method Summary
Modifier and TypeMethodDescriptioncause()
Returns the value of thecause
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.reason()
Returns the value of thereason
record component.routing()
Returns the value of therouting
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
ShardFailure
Creates an instance of aShardFailure
record class.- Parameters:
routing
- the value for therouting
record componentreason
- the value for thereason
record componentcause
- the value for thecause
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. All components in this record class are compared withObjects::equals(Object,Object)
. -
routing
Returns the value of therouting
record component.- Returns:
- the value of the
routing
record component
-
reason
Returns the value of thereason
record component.- Returns:
- the value of the
reason
record component
-
cause
Returns the value of thecause
record component.- Returns:
- the value of the
cause
record component
-