|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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 |
---|
void onMaster()
void offMaster()
String executorName()
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
).
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |