public interface IEndpointSnitch
Modifier and Type | Method and Description |
---|---|
int |
compareEndpoints(java.net.InetAddress target,
java.net.InetAddress a1,
java.net.InetAddress a2)
compares two endpoints in relation to the target endpoint, returning as Comparator.compare would
|
java.lang.String |
getDatacenter(java.net.InetAddress endpoint)
returns a String representing the datacenter this endpoint belongs to
|
java.lang.String |
getRack(java.net.InetAddress endpoint)
returns a String repesenting the rack this endpoint belongs to
|
java.util.List<java.net.InetAddress> |
getSortedListByProximity(java.net.InetAddress address,
java.util.Collection<java.net.InetAddress> unsortedAddress)
returns a new List sorted by proximity to the given endpoint
|
void |
gossiperStarting()
called after Gossiper instance exists immediately before it starts gossiping
|
boolean |
isWorthMergingForRangeQuery(java.util.List<java.net.InetAddress> merged,
java.util.List<java.net.InetAddress> l1,
java.util.List<java.net.InetAddress> l2)
Returns whether for a range query doing a query against merged is likely
to be faster than 2 sequential queries, one against l1 followed by one against l2.
|
void |
sortByProximity(java.net.InetAddress address,
java.util.List<java.net.InetAddress> addresses)
This method will sort the List by proximity to the given address.
|
java.lang.String getRack(java.net.InetAddress endpoint)
java.lang.String getDatacenter(java.net.InetAddress endpoint)
java.util.List<java.net.InetAddress> getSortedListByProximity(java.net.InetAddress address, java.util.Collection<java.net.InetAddress> unsortedAddress)
void sortByProximity(java.net.InetAddress address, java.util.List<java.net.InetAddress> addresses)
int compareEndpoints(java.net.InetAddress target, java.net.InetAddress a1, java.net.InetAddress a2)
void gossiperStarting()
boolean isWorthMergingForRangeQuery(java.util.List<java.net.InetAddress> merged, java.util.List<java.net.InetAddress> l1, java.util.List<java.net.InetAddress> l2)
Copyright © 2015 The Apache Software Foundation