Interface IClusterTopologyObserver
- All Superinterfaces:
Serializable
- All Known Implementing Classes:
ClusterTopologyObserver
An observer that can be used to listen for changes to the cluster topology (e.g. when a node is added or removed from
the cluster).
- Since:
- 3.1.0
- Author:
- XIMA MEDIA GmbH
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addListener
(IClusterTopologyListener listener) Adds a listener that will be invoked when an event related to a change in the cluster topology occurs.default void
Deprecated.This event is not supported anymore.void
onNodeJoined
(NodeJoinEvent event) Method that should be called when a node was added to the cluster.void
onNodeLeft
(NodeLeftEvent event) Method that should be called when a node was removed from the cluster.void
removeListener
(IClusterTopologyListener listener) Removes a listener previously added viaaddListener(IClusterTopologyListener)
.
-
Method Details
-
onNodeJoined
Method that should be called when a node was added to the cluster. This method should invoke the appropriate listeners added viaaddListener(IClusterTopologyListener)
.- Parameters:
event
- Details about the node that joined the cluster.
-
onNodeLeft
Method that should be called when a node was removed from the cluster. This method should invoke the appropriate listeners added viaaddListener(IClusterTopologyListener)
.- Parameters:
event
- Details about the node that left the cluster.
-
onNodeCrashSuspect
Deprecated.This event is not supported anymore. There is no replacement.Method that should be called when the connection to a node may have been lost. This method should invoke the appropriate listeners added viaaddListener(IClusterTopologyListener)
.- Parameters:
event
- Details about the node that is suspected to have lost the connection to the cluster.
-
addListener
Adds a listener that will be invoked when an event related to a change in the cluster topology occurs.- Parameters:
listener
- Listener to add that will be invoked when an event occurs.
-
removeListener
Removes a listener previously added viaaddListener(IClusterTopologyListener)
.- Parameters:
listener
- Listener that should not be invoked anymore.
-