Record Class JoinTaskExecutor.Task
java.lang.Object
java.lang.Record
org.elasticsearch.cluster.coordination.JoinTaskExecutor.Task
- All Implemented Interfaces:
ClusterStateTaskListener
- Enclosing class:
- JoinTaskExecutor
public static record JoinTaskExecutor.Task(DiscoveryNode node, String reason, ActionListener<Void> listener)
extends Record
implements ClusterStateTaskListener
-
Constructor Summary
ConstructorsConstructorDescriptionTask(DiscoveryNode node, String reason, ActionListener<Void> listener) Creates an instance of aTaskrecord class. -
Method Summary
Modifier and TypeMethodDescriptionvoidclusterStateProcessed(ClusterState oldState, ClusterState newState) Called when the result of theClusterStateTaskExecutor.execute(ClusterState, List)have been processed properly by all listeners.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanbooleanlistener()Returns the value of thelistenerrecord component.node()Returns the value of thenoderecord component.voidA callback for when task execution fails.reason()Returns the value of thereasonrecord component.toString()Returns a string representation of this record class.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.elasticsearch.cluster.ClusterStateTaskListener
onNoLongerMaster
-
Constructor Details
-
Task
Creates an instance of aTaskrecord class.- Parameters:
node- the value for thenoderecord componentreason- the value for thereasonrecord componentlistener- the value for thelistenerrecord 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. -
isBecomeMasterTask
public boolean isBecomeMasterTask() -
isFinishElectionTask
public boolean isFinishElectionTask() -
onFailure
Description copied from interface:ClusterStateTaskListenerA callback for when task execution fails. Implementations of this callback must not throw exceptions: an exception thrown here is logged by the master service atERRORlevel and otherwise ignored, except in tests where it raises anAssertionError. If log-and-ignore is the right behaviour then implementations must do so themselves, typically using a more specific logger and at a less dramatic log level.- Specified by:
onFailurein interfaceClusterStateTaskListener
-
clusterStateProcessed
Description copied from interface:ClusterStateTaskListenerCalled when the result of theClusterStateTaskExecutor.execute(ClusterState, List)have been processed properly by all listeners. Implementations of this callback must not throw exceptions: an exception thrown here is logged by the master service atERRORlevel and otherwise ignored, except in tests where it raises anAssertionError. If log-and-ignore is the right behaviour then implementations must do so themselves, typically using a more specific logger and at a less dramatic log level.- Specified by:
clusterStateProcessedin interfaceClusterStateTaskListener
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
node
Returns the value of thenoderecord component.- Returns:
- the value of the
noderecord component
-
reason
Returns the value of thereasonrecord component.- Returns:
- the value of the
reasonrecord component
-
listener
Returns the value of thelistenerrecord component.- Returns:
- the value of the
listenerrecord component
-