java.lang.Object
java.lang.Record
org.elasticsearch.health.node.DslErrorInfo
- All Implemented Interfaces:
Writeable
public record DslErrorInfo(String indexName, long firstOccurrence, int retryCount)
extends Record
implements Writeable
Represents a reduced view into an
ErrorEntry
, removing the
exception message and last occurrence timestamp as we could potentially send thousands of entries over the wire
and the omitted fields would not be used.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V>
-
Constructor Summary
ConstructorsConstructorDescriptionDslErrorInfo
(String indexName, long firstOccurrence, int retryCount) Creates an instance of aDslErrorInfo
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.long
Returns the value of thefirstOccurrence
record component.final int
hashCode()
Returns a hash code value for this object.Returns the value of theindexName
record component.int
Returns the value of theretryCount
record component.final String
toString()
Returns a string representation of this record class.void
writeTo
(StreamOutput out) Write this into the StreamOutput.
-
Constructor Details
-
DslErrorInfo
- Throws:
IOException
-
DslErrorInfo
Creates an instance of aDslErrorInfo
record class.- Parameters:
indexName
- the value for theindexName
record componentfirstOccurrence
- the value for thefirstOccurrence
record componentretryCount
- the value for theretryCount
record component
-
-
Method Details
-
writeTo
Description copied from interface:Writeable
Write this into the StreamOutput.- Specified by:
writeTo
in interfaceWriteable
- Throws:
IOException
-
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 '=='. -
indexName
Returns the value of theindexName
record component.- Returns:
- the value of the
indexName
record component
-
firstOccurrence
public long firstOccurrence()Returns the value of thefirstOccurrence
record component.- Returns:
- the value of the
firstOccurrence
record component
-
retryCount
public int retryCount()Returns the value of theretryCount
record component.- Returns:
- the value of the
retryCount
record component
-