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
ConstructorDescriptionLegacyClusterTaskResultActionListener
(ClusterStateTaskListener task, ClusterState originalState) Deprecated.Creates an instance of aLegacyClusterTaskResultActionListener
record class. -
Method Summary
Modifier and TypeMethodDescriptionvoid
accept
(ClusterState publishedState) Deprecated.final boolean
Deprecated.Indicates whether some other object is "equal to" this one.final int
hashCode()
Deprecated.Returns a hash code value for this object.Deprecated.Returns the value of theoriginalState
record component.task()
Deprecated.Returns the value of thetask
record component.final String
toString()
Deprecated.Returns a string representation of this record class.
-
Constructor Details
-
LegacyClusterTaskResultActionListener
public LegacyClusterTaskResultActionListener(ClusterStateTaskListener task, ClusterState originalState) Deprecated.Creates an instance of aLegacyClusterTaskResultActionListener
record class.- Parameters:
task
- the value for thetask
record componentoriginalState
- the value for theoriginalState
record component
-
-
Method Details
-
accept
Deprecated.- Specified by:
accept
in 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 thetask
record component.- Returns:
- the value of the
task
record component
-
originalState
Deprecated.Returns the value of theoriginalState
record component.- Returns:
- the value of the
originalState
record component
-