Module org.elasticsearch.server
Package org.elasticsearch.cluster
Interface ClusterStateObserver.Listener
- All Known Implementing Classes:
NodeAndClusterIdStateListener
- Enclosing class:
ClusterStateObserver
public static interface ClusterStateObserver.Listener
-
Method Summary
Modifier and TypeMethodDescriptionvoidcalled when the cluster service is closedvoidonNewClusterState(ClusterState state) Called when a new state is observed.voidCalled when theClusterStateObservertimes out while waiting for a new matching cluster state if a timeout is used when creating the observer.
-
Method Details
-
onNewClusterState
Called when a new state is observed. Implementations should avoid doing heavy operations on the calling thread and fork to a threadpool if necessary to avoid blocking theClusterApplierService. Note that operations such as sending a new request (e.g. viaClientorTransportService) is cheap enough to be performed without forking. -
onClusterServiceClose
void onClusterServiceClose()called when the cluster service is closed -
onTimeout
Called when theClusterStateObservertimes out while waiting for a new matching cluster state if a timeout is used when creating the observer. Upon timeout,onTimeoutis called on the GENERIC threadpool.
-