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(java.net.InetAddress endpoint,
EndpointState currentState,
ApplicationState newStateKey,
VersionedValue newValue) |
java.util.Map<java.net.InetAddress,java.lang.Double> |
getLoadInfo() |
void |
onAlive(java.net.InetAddress endpoint,
EndpointState state) |
void |
onChange(java.net.InetAddress endpoint,
ApplicationState state,
VersionedValue value) |
void |
onDead(java.net.InetAddress endpoint,
EndpointState state) |
void |
onJoin(java.net.InetAddress endpoint,
EndpointState epState)
Use to inform interested parties about the change in the state
for specified endpoint
|
void |
onRemove(java.net.InetAddress endpoint) |
void |
onRestart(java.net.InetAddress endpoint,
EndpointState state)
Called whenever a node is restarted.
|
void |
startBroadcasting() |
public static final LoadBroadcaster instance
public void onChange(java.net.InetAddress endpoint,
ApplicationState state,
VersionedValue value)
onChange in interface IEndpointStateChangeSubscriberpublic void onJoin(java.net.InetAddress 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 beforeChange(java.net.InetAddress endpoint,
EndpointState currentState,
ApplicationState newStateKey,
VersionedValue newValue)
beforeChange in interface IEndpointStateChangeSubscriberpublic void onAlive(java.net.InetAddress endpoint,
EndpointState state)
onAlive in interface IEndpointStateChangeSubscriberpublic void onDead(java.net.InetAddress endpoint,
EndpointState state)
onDead in interface IEndpointStateChangeSubscriberpublic void onRestart(java.net.InetAddress endpoint,
EndpointState state)
IEndpointStateChangeSubscriberstate.isAlive() == false
as state is from before the restarted node is marked up.onRestart in interface IEndpointStateChangeSubscriberpublic void onRemove(java.net.InetAddress endpoint)
onRemove in interface IEndpointStateChangeSubscriberpublic java.util.Map<java.net.InetAddress,java.lang.Double> getLoadInfo()
public void startBroadcasting()
Copyright © 2016 The Apache Software Foundation