public interface LocalNodeMasterListener
Modifier and Type | Method and Description |
---|---|
java.lang.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
|
void onMaster()
void offMaster()
java.lang.String executorName()
SAME
(indicating that the callbacks 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 separate more appropriate executor (eg. GENERIC
or MANAGEMENT
).