java.lang.Object
java.lang.Record
org.elasticsearch.health.node.DslErrorInfo
- All Implemented Interfaces:
Writeable
public record DslErrorInfo(String indexName, long firstOccurrence, int retryCount, ProjectId projectId)
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) DslErrorInfo(String indexName, long firstOccurrence, int retryCount, ProjectId projectId) Creates an instance of aDslErrorInforecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.longReturns the value of thefirstOccurrencerecord component.final inthashCode()Returns a hash code value for this object.Returns the value of theindexNamerecord component.Returns the value of theprojectIdrecord component.intReturns the value of theretryCountrecord component.final StringtoString()Returns a string representation of this record class.voidwriteTo(StreamOutput out) Write this into the StreamOutput.
-
Constructor Details
-
DslErrorInfo
-
DslErrorInfo
- Throws:
IOException
-
DslErrorInfo
Creates an instance of aDslErrorInforecord class.- Parameters:
indexName- the value for theindexNamerecord componentfirstOccurrence- the value for thefirstOccurrencerecord componentretryCount- the value for theretryCountrecord componentprojectId- the value for theprojectIdrecord component
-
-
Method Details
-
writeTo
Description copied from interface:WriteableWrite this into the StreamOutput.- Specified by:
writeToin 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 theindexNamerecord component.- Returns:
- the value of the
indexNamerecord component
-
firstOccurrence
public long firstOccurrence()Returns the value of thefirstOccurrencerecord component.- Returns:
- the value of the
firstOccurrencerecord component
-
retryCount
public int retryCount()Returns the value of theretryCountrecord component.- Returns:
- the value of the
retryCountrecord component
-
projectId
Returns the value of theprojectIdrecord component.- Returns:
- the value of the
projectIdrecord component
-