Module org.elasticsearch.server
Record Class PendingClusterTask
java.lang.Object
java.lang.Record
org.elasticsearch.cluster.service.PendingClusterTask
- All Implemented Interfaces:
Writeable
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V>
-
Constructor Summary
ConstructorsConstructorDescriptionPendingClusterTask
(long insertOrder, Priority priority, Text source, long timeInQueue, boolean executing) Creates an instance of aPendingClusterTask
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.boolean
Returns the value of theexecuting
record component.long
long
final int
hashCode()
Returns a hash code value for this object.long
Returns the value of theinsertOrder
record component.boolean
priority()
Returns the value of thepriority
record component.source()
Returns the value of thesource
record component.long
Returns the value of thetimeInQueue
record component.final String
toString()
Returns a string representation of this record class.void
writeTo
(StreamOutput out) Write this into the StreamOutput.
-
Constructor Details
-
PendingClusterTask
- Throws:
IOException
-
PendingClusterTask
public PendingClusterTask(long insertOrder, Priority priority, Text source, long timeInQueue, boolean executing) Creates an instance of aPendingClusterTask
record class.- Parameters:
insertOrder
- the value for theinsertOrder
record componentpriority
- the value for thepriority
record componentsource
- the value for thesource
record componenttimeInQueue
- the value for thetimeInQueue
record componentexecuting
- the value for theexecuting
record component
-
-
Method Details
-
getInsertOrder
public long getInsertOrder() -
getPriority
-
getSource
-
getTimeInQueueInMillis
public long getTimeInQueueInMillis() -
getTimeInQueue
-
isExecuting
public boolean isExecuting() -
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 '=='. -
insertOrder
public long insertOrder()Returns the value of theinsertOrder
record component.- Returns:
- the value of the
insertOrder
record component
-
priority
Returns the value of thepriority
record component.- Returns:
- the value of the
priority
record component
-
source
Returns the value of thesource
record component.- Returns:
- the value of the
source
record component
-
timeInQueue
public long timeInQueue()Returns the value of thetimeInQueue
record component.- Returns:
- the value of the
timeInQueue
record component
-
executing
public boolean executing()Returns the value of theexecuting
record component.- Returns:
- the value of the
executing
record component
-