|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.cassandra.locator.AbstractEndpointSnitch
public abstract class AbstractEndpointSnitch
Constructor Summary | |
---|---|
AbstractEndpointSnitch()
|
Method Summary | |
---|---|
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 |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.apache.cassandra.locator.IEndpointSnitch |
---|
getDatacenter, getRack |
Constructor Detail |
---|
public AbstractEndpointSnitch()
Method Detail |
---|
public abstract int compareEndpoints(java.net.InetAddress target, java.net.InetAddress a1, java.net.InetAddress a2)
IEndpointSnitch
compareEndpoints
in interface IEndpointSnitch
public java.util.List<java.net.InetAddress> getSortedListByProximity(java.net.InetAddress address, java.util.Collection<java.net.InetAddress> unsortedAddress)
getSortedListByProximity
in interface IEndpointSnitch
address
- the address to sort by proximity tounsortedAddress
- the nodes to sort
public void sortByProximity(java.net.InetAddress address, java.util.List<java.net.InetAddress> addresses)
sortByProximity
in interface IEndpointSnitch
address
- the address to sort the proximity byaddresses
- the nodes to sortpublic void gossiperStarting()
IEndpointSnitch
gossiperStarting
in interface IEndpointSnitch
public boolean isWorthMergingForRangeQuery(java.util.List<java.net.InetAddress> merged, java.util.List<java.net.InetAddress> l1, java.util.List<java.net.InetAddress> l2)
IEndpointSnitch
isWorthMergingForRangeQuery
in interface IEndpointSnitch
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |