List of usage examples for org.apache.cassandra.gms ApplicationState DC
ApplicationState DC
To view the source code for org.apache.cassandra.gms ApplicationState DC.
Click Source Link
From source file:brooklyn.entity.nosql.cassandra.customsnitch.MultiCloudSnitch.java
License:Apache License
public String getDatacenter(InetAddress endpoint) { if (endpoint.equals(FBUtilities.getBroadcastAddress())) return datacenter; EndpointState state = Gossiper.instance.getEndpointStateForEndpoint(endpoint); if (state == null || state.getApplicationState(ApplicationState.DC) == null) return DEFAULT_DC; return state.getApplicationState(ApplicationState.DC).value; }