|
||||||||||
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
Field Summary | |
---|---|
protected java.util.List<AbstractReplicationStrategy> |
subscribers
|
Constructor Summary | |
---|---|
AbstractEndpointSnitch()
|
Method Summary | |
---|---|
void |
cacheEndpoint(Token t,
java.util.ArrayList<java.net.InetAddress> addr)
puts an address in the cache for a given token. |
void |
clearEndpointCache()
clears all cache values. |
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.ArrayList<java.net.InetAddress> |
getCachedEndpoints(Token t)
returns a list of cached endpoints for a given token. |
abstract 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 |
abstract java.util.List<java.net.InetAddress> |
sortByProximity(java.net.InetAddress address,
java.util.List<java.net.InetAddress> addresses)
This method will sort the List 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 |
Field Detail |
---|
protected java.util.List<AbstractReplicationStrategy> subscribers
Constructor Detail |
---|
public AbstractEndpointSnitch()
Method Detail |
---|
public java.util.ArrayList<java.net.InetAddress> getCachedEndpoints(Token t)
IEndpointSnitch
getCachedEndpoints
in interface IEndpointSnitch
public void cacheEndpoint(Token t, java.util.ArrayList<java.net.InetAddress> addr)
IEndpointSnitch
cacheEndpoint
in interface IEndpointSnitch
public void clearEndpointCache()
IEndpointSnitch
clearEndpointCache
in interface IEndpointSnitch
public abstract java.util.List<java.net.InetAddress> getSortedListByProximity(java.net.InetAddress address, java.util.Collection<java.net.InetAddress> unsortedAddress)
IEndpointSnitch
getSortedListByProximity
in interface IEndpointSnitch
public abstract java.util.List<java.net.InetAddress> sortByProximity(java.net.InetAddress address, java.util.List<java.net.InetAddress> addresses)
IEndpointSnitch
sortByProximity
in interface IEndpointSnitch
public int compareEndpoints(java.net.InetAddress target, java.net.InetAddress a1, java.net.InetAddress a2)
IEndpointSnitch
compareEndpoints
in interface IEndpointSnitch
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |