public class LoadBroadcaster extends java.lang.Object implements IEndpointStateChangeSubscriber
Modifier and Type | Field and Description |
---|---|
static LoadBroadcaster |
instance |
Modifier and Type | Method and Description |
---|---|
void |
beforeChange(InetAddressAndPort endpoint,
EndpointState currentState,
ApplicationState newStateKey,
VersionedValue newValue) |
java.util.Map<InetAddressAndPort,java.lang.Double> |
getLoadInfo() |
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.
|
void |
startBroadcasting() |
public static final LoadBroadcaster instance
public void onChange(InetAddressAndPort endpoint, ApplicationState state, VersionedValue value)
onChange
in interface IEndpointStateChangeSubscriber
public void onJoin(InetAddressAndPort endpoint, EndpointState epState)
IEndpointStateChangeSubscriber
onJoin
in interface IEndpointStateChangeSubscriber
endpoint
- endpoint for which the state change occurred.epState
- state that actually changed for the above endpoint.public void beforeChange(InetAddressAndPort endpoint, EndpointState currentState, ApplicationState newStateKey, VersionedValue newValue)
beforeChange
in interface IEndpointStateChangeSubscriber
public void onAlive(InetAddressAndPort endpoint, EndpointState state)
onAlive
in interface IEndpointStateChangeSubscriber
public void onDead(InetAddressAndPort endpoint, EndpointState state)
onDead
in interface IEndpointStateChangeSubscriber
public void onRestart(InetAddressAndPort endpoint, EndpointState state)
IEndpointStateChangeSubscriber
state.isAlive() == false
as state
is from before the restarted node is marked up.onRestart
in interface IEndpointStateChangeSubscriber
public void onRemove(InetAddressAndPort endpoint)
onRemove
in interface IEndpointStateChangeSubscriber
public java.util.Map<InetAddressAndPort,java.lang.Double> getLoadInfo()
public void startBroadcasting()
Copyright © 2009-2021 The Apache Software Foundation