public abstract class AbstractEndpointSnitch extends java.lang.Object implements IEndpointSnitch
| Constructor and Description | 
|---|
| AbstractEndpointSnitch() | 
| Modifier and Type | Method and Description | 
|---|---|
| abstract 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.util.List<java.net.InetAddress> | getSortedListByProximity(java.net.InetAddress address,
                        java.util.Collection<java.net.InetAddress> unsortedAddress)Sorts the Collection of node addresses by proximity to the given address | 
| 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)Sorts the List of node addresses, in-place, by proximity to the given address | 
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetDatacenter, getRackpublic abstract int compareEndpoints(java.net.InetAddress target,
                                     java.net.InetAddress a1,
                                     java.net.InetAddress a2)
IEndpointSnitchcompareEndpoints in interface IEndpointSnitchpublic java.util.List<java.net.InetAddress> getSortedListByProximity(java.net.InetAddress address,
                                                                     java.util.Collection<java.net.InetAddress> unsortedAddress)
getSortedListByProximity in interface IEndpointSnitchaddress - the address to sort by proximity tounsortedAddress - the nodes to sortpublic void sortByProximity(java.net.InetAddress address,
                            java.util.List<java.net.InetAddress> addresses)
sortByProximity in interface IEndpointSnitchaddress - the address to sort the proximity byaddresses - the nodes to sortpublic void gossiperStarting()
IEndpointSnitchgossiperStarting in interface IEndpointSnitchpublic boolean isWorthMergingForRangeQuery(java.util.List<java.net.InetAddress> merged,
                                           java.util.List<java.net.InetAddress> l1,
                                           java.util.List<java.net.InetAddress> l2)
IEndpointSnitchisWorthMergingForRangeQuery in interface IEndpointSnitchCopyright © 2018 The Apache Software Foundation