|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.cassandra.locator.AbstractEndpointSnitch
org.apache.cassandra.locator.EndPointSnitch
public class EndPointSnitch
Constructor Summary | |
---|---|
EndPointSnitch()
|
Method Summary | |
---|---|
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. |
boolean |
isInSameDataCenter(java.net.InetAddress host,
java.net.InetAddress host2)
Helps determine if 2 nodes are in the same data center. |
boolean |
isOnSameRack(java.net.InetAddress host,
java.net.InetAddress host2)
Helps determine if 2 nodes are in the same rack in the data center. |
Methods inherited from class org.apache.cassandra.locator.AbstractEndpointSnitch |
---|
getSortedListByProximity, sortByProximity |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public EndPointSnitch()
Method Detail |
---|
public boolean isOnSameRack(java.net.InetAddress host, java.net.InetAddress host2) throws java.net.UnknownHostException
AbstractEndpointSnitch
isOnSameRack
in class AbstractEndpointSnitch
host
- a specified endpointhost2
- another specified endpoint
java.net.UnknownHostException
public boolean isInSameDataCenter(java.net.InetAddress host, java.net.InetAddress host2) throws java.net.UnknownHostException
AbstractEndpointSnitch
isInSameDataCenter
in class AbstractEndpointSnitch
host
- a specified endpointhost2
- another specified endpoint
java.net.UnknownHostException
public java.lang.String getLocation(java.net.InetAddress endpoint) throws java.net.UnknownHostException
AbstractEndpointSnitch
getLocation
in class AbstractEndpointSnitch
java.net.UnknownHostException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |