Package org.apache.cassandra.gms
Interface IEndpointStateChangeSubscriber
- All Known Implementing Classes:
ActiveRepairService,DefaultSchemaUpdateHandler,DiskUsageBroadcaster,LoadBroadcaster,PaxosCleanupSession,ReconnectableSnitchHelper,RepairSession,StorageService
public interface IEndpointStateChangeSubscriber
This is called by an instance of the IEndpointStateChangePublisher to notify
interested parties about changes in the the state associated with any endpoint.
For instance if node A figures there is a changes in state for an endpoint B
it notifies all interested parties of this change. It is upto to the registered
instance to decide what he does with this change. Not all modules maybe interested
in all state changes.
-
Method Summary
Modifier and TypeMethodDescriptiondefault voidbeforeChange(InetAddressAndPort endpoint, EndpointState currentState, ApplicationState newStateKey, VersionedValue newValue) default voidonAlive(InetAddressAndPort endpoint, EndpointState state) default voidonChange(InetAddressAndPort endpoint, ApplicationState state, VersionedValue value) default voidonDead(InetAddressAndPort endpoint, EndpointState state) default voidonJoin(InetAddressAndPort endpoint, EndpointState epState) Use to inform interested parties about the change in the state for specified endpointdefault voidonRemove(InetAddressAndPort endpoint) default voidonRestart(InetAddressAndPort endpoint, EndpointState state) Called whenever a node is restarted.
-
Method Details
-
onJoin
Use to inform interested parties about the change in the state for specified endpoint- Parameters:
endpoint- endpoint for which the state change occurred.epState- state that actually changed for the above endpoint.
-
beforeChange
default void beforeChange(InetAddressAndPort endpoint, EndpointState currentState, ApplicationState newStateKey, VersionedValue newValue) -
onChange
-
onAlive
-
onDead
-
onRemove
-
onRestart
Called whenever a node is restarted. Note that there is no guarantee when that happens that the node was previously marked down. It will have only ifstate.isAlive() == falseasstateis from before the restarted node is marked up.
-