Module org.elasticsearch.server
Package org.elasticsearch.index.reindex
Record Class ResumeInfo.SliceStatus
java.lang.Object
java.lang.Record
org.elasticsearch.index.reindex.ResumeInfo.SliceStatus
- All Implemented Interfaces:
Writeable
- Enclosing class:
ResumeInfo
public static record ResumeInfo.SliceStatus(int sliceId, ResumeInfo.WorkerResumeInfo resumeInfo, ResumeInfo.WorkerResult result)
extends Record
implements Writeable
Information for a single slice of a BulkByScrollTask.
It contains either:
- the WorkerResumeInfo for the worker that processed the slice if the task was not completed
- or the final result of the slice if it has completed (successfully or erroneously).
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V> -
Constructor Summary
ConstructorsConstructorDescriptionSliceStatus(int sliceId, ResumeInfo.WorkerResumeInfo resumeInfo, ResumeInfo.WorkerResult result) Creates an instance of aSliceStatusrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanresult()Returns the value of theresultrecord component.Returns the value of theresumeInforecord component.intsliceId()Returns the value of thesliceIdrecord component.final StringtoString()Returns a string representation of this record class.voidwriteTo(StreamOutput out) Write this into the StreamOutput.
-
Constructor Details
-
SliceStatus
public SliceStatus(int sliceId, @Nullable ResumeInfo.WorkerResumeInfo resumeInfo, @Nullable ResumeInfo.WorkerResult result) Creates an instance of aSliceStatusrecord class.- Parameters:
sliceId- the value for thesliceIdrecord componentresumeInfo- the value for theresumeInforecord componentresult- the value for theresultrecord component
-
SliceStatus
- Throws:
IOException
-
-
Method Details
-
writeTo
Description copied from interface:WriteableWrite this into the StreamOutput.- Specified by:
writeToin interfaceWriteable- Throws:
IOException
-
isCompleted
public boolean isCompleted() -
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 '=='. -
sliceId
public int sliceId()Returns the value of thesliceIdrecord component.- Returns:
- the value of the
sliceIdrecord component
-
resumeInfo
Returns the value of theresumeInforecord component.- Returns:
- the value of the
resumeInforecord component
-
result
Returns the value of theresultrecord component.- Returns:
- the value of the
resultrecord component
-