public class MultiCloudSnitch
extends AbstractNetworkTopologySnitch
The code is very similar to Ec2MultiRegionSnitch, except that it uses the the config file rather than querying EC2 to get the IPs.
If two nodes are in the same datacenter, they will attempt to communicate using the privateip. If they are in different datacenters, they will use the publicip.
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
SNITCH_PROPERTIES_FILENAME |
Constructor and Description |
---|
MultiCloudSnitch() |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getDatacenter(java.net.InetAddress endpoint) |
java.lang.String |
getRack(java.net.InetAddress endpoint) |
void |
gossiperStarting() |
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) |
void |
onRemove(java.net.InetAddress endpoint) |
void |
onRestart(java.net.InetAddress endpoint,
EndpointState state) |
void |
reloadConfiguration() |
public static final java.lang.String SNITCH_PROPERTIES_FILENAME
public MultiCloudSnitch() throws ConfigurationException
ConfigurationException
public void reloadConfiguration() throws ConfigurationException
ConfigurationException
public java.lang.String getRack(java.net.InetAddress endpoint)
public java.lang.String getDatacenter(java.net.InetAddress endpoint)
public void onJoin(java.net.InetAddress endpoint, EndpointState epState)
public void onChange(java.net.InetAddress endpoint, ApplicationState state, VersionedValue value)
public void onAlive(java.net.InetAddress endpoint, EndpointState state)
public void onDead(java.net.InetAddress endpoint, EndpointState state)
public void onRestart(java.net.InetAddress endpoint, EndpointState state)
public void onRemove(java.net.InetAddress endpoint)
public void gossiperStarting()