|
||||||||||
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 java.lang.String |
getLocation(java.net.InetAddress endpoint)
Given endpoints this method will help us know the datacenter name where the node is located at. |
java.util.List<java.net.InetAddress> |
getSortedListByProximity(java.net.InetAddress address,
java.util.Collection<java.net.InetAddress> unsortedAddress)
returns a new List |
abstract boolean |
isInSameDataCenter(java.net.InetAddress host,
java.net.InetAddress host2)
Helps determine if 2 nodes are in the same data center. |
abstract boolean |
isOnSameRack(java.net.InetAddress host,
java.net.InetAddress host2)
Helps determine if 2 nodes are in the same rack in the data center. |
java.util.List<java.net.InetAddress> |
sortByProximity(java.net.InetAddress address,
java.util.List<java.net.InetAddress> addresses)
This method will sort the List |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AbstractEndpointSnitch()
Method Detail |
---|
public abstract boolean isOnSameRack(java.net.InetAddress host, java.net.InetAddress host2) throws java.net.UnknownHostException
host
- a specified endpointhost2
- another specified endpoint
java.net.UnknownHostException
public abstract boolean isInSameDataCenter(java.net.InetAddress host, java.net.InetAddress host2) throws java.net.UnknownHostException
host
- a specified endpointhost2
- another specified endpoint
java.net.UnknownHostException
public abstract java.lang.String getLocation(java.net.InetAddress endpoint) throws java.net.UnknownHostException
java.net.UnknownHostException
public java.util.List<java.net.InetAddress> getSortedListByProximity(java.net.InetAddress address, java.util.Collection<java.net.InetAddress> unsortedAddress)
IEndPointSnitch
getSortedListByProximity
in interface IEndPointSnitch
public java.util.List<java.net.InetAddress> sortByProximity(java.net.InetAddress address, java.util.List<java.net.InetAddress> addresses)
IEndPointSnitch
sortByProximity
in interface IEndPointSnitch
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |