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
All Methods Instance Methods Default Methods Modifier and Type Method Description default void
beforeChange(InetAddressAndPort endpoint, EndpointState currentState, ApplicationState newStateKey, VersionedValue newValue)
default void
onAlive(InetAddressAndPort endpoint, EndpointState state)
default void
onChange(InetAddressAndPort endpoint, ApplicationState state, VersionedValue value)
default void
onDead(InetAddressAndPort endpoint, EndpointState state)
default void
onJoin(InetAddressAndPort endpoint, EndpointState epState)
Use to inform interested parties about the change in the state for specified endpointdefault void
onRemove(InetAddressAndPort endpoint)
default void
onRestart(InetAddressAndPort endpoint, EndpointState state)
Called whenever a node is restarted.
-
-
-
Method Detail
-
onJoin
default void onJoin(InetAddressAndPort endpoint, EndpointState epState)
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
default void onChange(InetAddressAndPort endpoint, ApplicationState state, VersionedValue value)
-
onAlive
default void onAlive(InetAddressAndPort endpoint, EndpointState state)
-
onDead
default void onDead(InetAddressAndPort endpoint, EndpointState state)
-
onRemove
default void onRemove(InetAddressAndPort endpoint)
-
onRestart
default void onRestart(InetAddressAndPort endpoint, EndpointState state)
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() == false
asstate
is from before the restarted node is marked up.
-
-