It will be helpful if each module can listen to topology changes in order to change its behaviour.
A module must implement the TopologyChangeEventListener interface in order to listen to a TopologyChangeEvent.
When a change in topology occurs than it will be notified about this event receiving a TopologyChangeEvent.
This event will have the following fields:
instanceId, the unique identifier that is related to the instance leaving, joining the cluster or that has been elected
ownInstanceId, the unique identifier that is related to the instance that is receiving the event
ownInstanceRole, the role that is related to the instance that is receiving the event
eventType, the type of the event (JOIN, LEAVE OR ELECTION)
This event is an abstraction over the different events that can occur when using an HA cluster or a Causal one.
It will be helpful if each module can listen to topology changes in order to change its behaviour.
A module must implement the TopologyChangeEventListener interface in order to listen to a TopologyChangeEvent. When a change in topology occurs than it will be notified about this event receiving a TopologyChangeEvent.
This event will have the following fields:
This event is an abstraction over the different events that can occur when using an HA cluster or a Causal one.