Package org.apache.cassandra.service
Interface IEndpointLifecycleSubscriber
- All Known Implementing Classes:
Server.EventNotifier
public interface IEndpointLifecycleSubscriber
Interface on which interested parties can be notified of high level endpoint
state changes.
Note that while IEndpointStateChangeSubscriber notify about gossip related
changes (IEndpointStateChangeSubscriber.onJoin() is called when a node join
gossip), this interface allows to be notified about higher level events.
-
Method Summary
Modifier and TypeMethodDescriptionvoidonDown(InetAddressAndPort endpoint) Called when a node is marked DOWN.voidonJoinCluster(InetAddressAndPort endpoint) Called when a new node joins the cluster, i.e.voidonLeaveCluster(InetAddressAndPort endpoint) Called when a new node leave the cluster (decommission or removeToken).voidonMove(InetAddressAndPort endpoint) Called when a node has moved (to a new token).voidonUp(InetAddressAndPort endpoint) Called when a node is marked UP.
-
Method Details
-
onJoinCluster
Called when a new node joins the cluster, i.e. either has just been bootstrapped or "instajoins".- Parameters:
endpoint- the newly added endpoint.
-
onLeaveCluster
Called when a new node leave the cluster (decommission or removeToken).- Parameters:
endpoint- the endpoint that is leaving.
-
onUp
Called when a node is marked UP.- Parameters:
endpoint- the endpoint marked UP.
-
onDown
Called when a node is marked DOWN.- Parameters:
endpoint- the endpoint marked DOWN.
-
onMove
Called when a node has moved (to a new token).- Parameters:
endpoint- the endpoint that has moved.
-