|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.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. |
java.util.List<java.net.InetAddress> |
sortByProximity(java.net.InetAddress address,
java.util.Collection<java.net.InetAddress> unsortedAddress)
This method will sort the Set |
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
IEndPointSnitch
isOnSameRack
in interface IEndPointSnitch
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
IEndPointSnitch
isInSameDataCenter
in interface IEndPointSnitch
host
- a specified endpointhost2
- another specified endpoint
java.net.UnknownHostException
public java.lang.String getLocation(java.net.InetAddress endpoint) throws java.net.UnknownHostException
IEndPointSnitch
getLocation
in interface IEndPointSnitch
java.net.UnknownHostException
public java.util.List<java.net.InetAddress> sortByProximity(java.net.InetAddress address, java.util.Collection<java.net.InetAddress> unsortedAddress)
IEndPointSnitch
sortByProximity
in interface IEndPointSnitch
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |