Module org.elasticsearch.server
Package org.elasticsearch.tasks
Record Class TaskManager.CancellableTaskInfo
java.lang.Object
java.lang.Record
org.elasticsearch.tasks.TaskManager.CancellableTaskInfo
- Record Components:
task- the cancellable taskelapsedNanos- how long the task has been running in nanosecondshasOutstandingChildren- true if this task has child tasks that haven't completed yet
- Enclosing class:
TaskManager
public static record TaskManager.CancellableTaskInfo(CancellableTask task, long elapsedNanos, boolean hasOutstandingChildren)
extends Record
Information about a cancellable task.
-
Constructor Summary
ConstructorsConstructorDescriptionCancellableTaskInfo(CancellableTask task, long elapsedNanos, boolean hasOutstandingChildren) Creates an instance of aCancellableTaskInforecord class. -
Method Summary
Modifier and TypeMethodDescriptionlongReturns the value of theelapsedNanosrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanReturns the value of thehasOutstandingChildrenrecord component.task()Returns the value of thetaskrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
CancellableTaskInfo
Creates an instance of aCancellableTaskInforecord class.- Parameters:
task- the value for thetaskrecord componentelapsedNanos- the value for theelapsedNanosrecord componenthasOutstandingChildren- the value for thehasOutstandingChildrenrecord 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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
task
Returns the value of thetaskrecord component.- Returns:
- the value of the
taskrecord component
-
elapsedNanos
public long elapsedNanos()Returns the value of theelapsedNanosrecord component.- Returns:
- the value of the
elapsedNanosrecord component
-
hasOutstandingChildren
public boolean hasOutstandingChildren()Returns the value of thehasOutstandingChildrenrecord component.- Returns:
- the value of the
hasOutstandingChildrenrecord component
-