public abstract class AbstractNetworkTopologySnitch extends AbstractEndpointSnitch
Constructor and Description |
---|
AbstractNetworkTopologySnitch() |
Modifier and Type | Method and Description |
---|---|
int |
compareEndpoints(InetAddressAndPort address,
Replica r1,
Replica r2)
compares two endpoints in relation to the target endpoint, returning as Comparator.compare would
|
abstract java.lang.String |
getDatacenter(InetAddressAndPort endpoint)
Return the data center for which an endpoint resides in
|
abstract java.lang.String |
getRack(InetAddressAndPort endpoint)
Return the rack for which an endpoint resides in
|
gossiperStarting, isWorthMergingForRangeQuery, sortedByProximity
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getDatacenter, getLocalDatacenter, getLocalRack, validate
public abstract java.lang.String getRack(InetAddressAndPort endpoint)
endpoint
- a specified endpointpublic abstract java.lang.String getDatacenter(InetAddressAndPort endpoint)
endpoint
- a specified endpointpublic int compareEndpoints(InetAddressAndPort address, Replica r1, Replica r2)
IEndpointSnitch
compareEndpoints
in interface IEndpointSnitch
compareEndpoints
in class AbstractEndpointSnitch
Copyright © 2009- The Apache Software Foundation