org.elasticsearch.cluster
Interface LocalNodeMasterListener


public interface LocalNodeMasterListener

Enables listening to master changes events of the local node (when the local node becomes the master, and when the local node cease being a master).


Method Summary
 String executorName()
          The name of the executor that the implementation of the callbacks of this lister should be executed on.
 void offMaster()
          Called when the local node used to be the master, a new master was elected and it's no longer the local node.
 void onMaster()
          Called when local node is elected to be the master
 

Method Detail

onMaster

void onMaster()
Called when local node is elected to be the master


offMaster

void offMaster()
Called when the local node used to be the master, a new master was elected and it's no longer the local node.


executorName

String executorName()
The name of the executor that the implementation of the callbacks of this lister should be executed on. The thread that is responsible for managing instances of this lister is the same thread handling the cluster state events. If the work done is the callbacks above is inexpensive, this value may be SAME (indicating that the callbaks will run on the same thread as the cluster state events are fired with). On the other hand, if the logic in the callbacks are heavier and take longer to process (or perhaps involve blocking due to IO operations), prefer to execute them on a separte more appropriate executor (eg. GENERIC or MANAGEMENT).

Returns:
The name of the executor that will run the callbacks of this listener.


Copyright © 2009-2012. All Rights Reserved.