Module org.elasticsearch.server
Package org.elasticsearch.cluster
Record Class ClusterStateTaskExecutor.LegacyClusterTaskResultActionListener
java.lang.Object
java.lang.Record
org.elasticsearch.cluster.ClusterStateTaskExecutor.LegacyClusterTaskResultActionListener
- All Implemented Interfaces:
Consumer<ClusterState>
- Enclosing interface:
- ClusterStateTaskExecutor<T extends ClusterStateTaskListener>
@Deprecated
public static record ClusterStateTaskExecutor.LegacyClusterTaskResultActionListener(ClusterStateTaskListener task, ClusterState originalState)
extends Record
implements Consumer<ClusterState>
Deprecated.
A
Consumer for passing to ClusterStateTaskExecutor.TaskContext.success(java.lang.Runnable) which preserves the
legacy behaviour of calling ClusterStateTaskListener.clusterStateProcessed(org.elasticsearch.cluster.ClusterState, org.elasticsearch.cluster.ClusterState) or ClusterStateTaskListener.onFailure(java.lang.Exception).
New implementations should use a dedicated listener rather than relying on this legacy behaviour.
-
Constructor Summary
ConstructorsConstructorDescriptionLegacyClusterTaskResultActionListener(ClusterStateTaskListener task, ClusterState originalState) Deprecated.Creates an instance of aLegacyClusterTaskResultActionListenerrecord class. -
Method Summary
Modifier and TypeMethodDescriptionvoidaccept(ClusterState publishedState) Deprecated.final booleanDeprecated.Indicates whether some other object is "equal to" this one.final inthashCode()Deprecated.Returns a hash code value for this object.Deprecated.Returns the value of theoriginalStaterecord component.task()Deprecated.Returns the value of thetaskrecord component.final StringtoString()Deprecated.Returns a string representation of this record class.
-
Constructor Details
-
LegacyClusterTaskResultActionListener
public LegacyClusterTaskResultActionListener(ClusterStateTaskListener task, ClusterState originalState) Deprecated.Creates an instance of aLegacyClusterTaskResultActionListenerrecord class.- Parameters:
task- the value for thetaskrecord componentoriginalState- the value for theoriginalStaterecord component
-
-
Method Details
-
accept
Deprecated.- Specified by:
acceptin interfaceConsumer<ClusterState>
-
toString
Deprecated.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()Deprecated.Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Deprecated.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). -
task
Deprecated.Returns the value of thetaskrecord component.- Returns:
- the value of the
taskrecord component
-
originalState
Deprecated.Returns the value of theoriginalStaterecord component.- Returns:
- the value of the
originalStaterecord component
-