public abstract class AbstractNetworkTopologySnitch extends AbstractEndpointSnitch
Constructor and Description |
---|
AbstractNetworkTopologySnitch() |
Modifier and Type | Method and Description |
---|---|
int |
compareEndpoints(java.net.InetAddress address,
java.net.InetAddress a1,
java.net.InetAddress a2)
compares two endpoints in relation to the target endpoint, returning as Comparator.compare would
|
abstract java.lang.String |
getDatacenter(java.net.InetAddress endpoint)
Return the data center for which an endpoint resides in
|
abstract java.lang.String |
getRack(java.net.InetAddress endpoint)
Return the rack for which an endpoint resides in
|
getSortedListByProximity, gossiperStarting, isWorthMergingForRangeQuery, sortByProximity
public abstract java.lang.String getRack(java.net.InetAddress endpoint)
endpoint
- a specified endpointpublic abstract java.lang.String getDatacenter(java.net.InetAddress endpoint)
endpoint
- a specified endpointpublic int compareEndpoints(java.net.InetAddress address, java.net.InetAddress a1, java.net.InetAddress a2)
IEndpointSnitch
compareEndpoints
in interface IEndpointSnitch
compareEndpoints
in class AbstractEndpointSnitch
Copyright © 2016 The Apache Software Foundation