Package org.elasticsearch.cluster
Interface ClusterStateTaskListener
- All Known Subinterfaces:
AckedClusterStateTaskListener
- All Known Implementing Classes:
AckedClusterStateUpdateTask,ClusterStateUpdateTask,LocalClusterUpdateTask,NodeRemovalClusterStateTaskExecutor,ShardStateAction.ShardStartedClusterStateTaskExecutor,SystemIndexMetadataUpgradeService.SystemIndexMetadataUpdateTask
public interface ClusterStateTaskListener
-
Method Summary
Modifier and TypeMethodDescriptiondefault voidclusterStateProcessed(String source, ClusterState oldState, ClusterState newState)Called when the result of theClusterStateTaskExecutor.execute(ClusterState, List)have been processed properly by all listeners.voidA callback for when task execution fails.default voidonNoLongerMaster(String source)A callback for when the task was rejected because the processing node is no longer the elected master.
-
Method Details
-
onFailure
A callback for when task execution fails. Implementations of this callback should not throw exceptions: an exception thrown here is logged by the master service atERRORlevel and otherwise ignored. If log-and-ignore is the right behaviour then implementations should do so themselves, typically using a more specific logger and at a less dramatic log level. -
onNoLongerMaster
A callback for when the task was rejected because the processing node is no longer the elected master. Implementations of this callback should not throw exceptions: an exception thrown here is logged by the master service atERRORlevel and otherwise ignored. If log-and-ignore is the right behaviour then implementations should do so themselves, typically using a more specific logger and at a less dramatic log level. -
clusterStateProcessed
Called when the result of theClusterStateTaskExecutor.execute(ClusterState, List)have been processed properly by all listeners. Implementations of this callback should not throw exceptions: an exception thrown here is logged by the master service atERRORlevel and otherwise ignored. If log-and-ignore is the right behaviour then implementations should do so themselves, typically using a more specific logger and at a less dramatic log level.
-