public class ReconnectableSnitchHelper extends java.lang.Object implements IEndpointStateChangeSubscriber
| Constructor and Description |
|---|
ReconnectableSnitchHelper(IEndpointSnitch snitch,
java.lang.String localDc,
boolean preferLocal) |
| Modifier and Type | Method and Description |
|---|---|
void |
beforeChange(InetAddressAndPort endpoint,
EndpointState currentState,
ApplicationState newStateKey,
VersionedValue newValue) |
void |
onAlive(InetAddressAndPort endpoint,
EndpointState state) |
void |
onChange(InetAddressAndPort endpoint,
ApplicationState state,
VersionedValue value) |
void |
onDead(InetAddressAndPort endpoint,
EndpointState state) |
void |
onJoin(InetAddressAndPort endpoint,
EndpointState epState)
Use to inform interested parties about the change in the state
for specified endpoint
|
void |
onRemove(InetAddressAndPort endpoint) |
void |
onRestart(InetAddressAndPort endpoint,
EndpointState state)
Called whenever a node is restarted.
|
public ReconnectableSnitchHelper(IEndpointSnitch snitch, java.lang.String localDc, boolean preferLocal)
public void beforeChange(InetAddressAndPort endpoint, EndpointState currentState, ApplicationState newStateKey, VersionedValue newValue)
beforeChange in interface IEndpointStateChangeSubscriberpublic void onJoin(InetAddressAndPort endpoint, EndpointState epState)
IEndpointStateChangeSubscriberonJoin in interface IEndpointStateChangeSubscriberendpoint - endpoint for which the state change occurred.epState - state that actually changed for the above endpoint.public void onChange(InetAddressAndPort endpoint, ApplicationState state, VersionedValue value)
onChange in interface IEndpointStateChangeSubscriberpublic void onAlive(InetAddressAndPort endpoint, EndpointState state)
onAlive in interface IEndpointStateChangeSubscriberpublic void onDead(InetAddressAndPort endpoint, EndpointState state)
onDead in interface IEndpointStateChangeSubscriberpublic void onRemove(InetAddressAndPort endpoint)
onRemove in interface IEndpointStateChangeSubscriberpublic void onRestart(InetAddressAndPort endpoint, EndpointState state)
IEndpointStateChangeSubscriberstate.isAlive() == false
as state is from before the restarted node is marked up.onRestart in interface IEndpointStateChangeSubscriberCopyright © 2009-2020 The Apache Software Foundation