RackInferringSnitch (apache-cassandra API)
Date: 2012-05-04

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.cassandra.locator
Class RackInferringSnitch

    java.lang.Object
      org.apache.cassandra.locator.AbstractEndpointSnitch
          org.apache.cassandra.locator.AbstractNetworkTopologySnitch
              org.apache.cassandra.locator.RackInferringSnitch

All Implemented Interfaces:
  IEndpointSnitch

    public class RackInferringSnitch

extends AbstractNetworkTopologySnitch

A simple endpoint snitch implementation that assumes datacenter and rack information is encoded in the 2nd and 3rd octets of the ip address, respectively.

Constructor Summary
`RackInferringSnitch()`

Method Summary
`java.lang.String` | `getDatacenter(java.net.InetAddress endpoint)` Return the data center for which an endpoint resides in
`java.lang.String` | `getRack(java.net.InetAddress endpoint)` Return the rack for which an endpoint resides in

Methods inherited from class org.apache.cassandra.locator.AbstractNetworkTopologySnitch
`compareEndpoints`

Methods inherited from class org.apache.cassandra.locator.AbstractEndpointSnitch
`getSortedListByProximity, gossiperStarting, sortByProximity`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### RackInferringSnitch

    public RackInferringSnitch()

Method Detail

### getRack

    public java.lang.String getRack(java.net.InetAddress endpoint)

  Description copied from class: `AbstractNetworkTopologySnitch`
  Return the rack for which an endpoint resides in

  Specified by:
    `getRack` in interface `IEndpointSnitch`
  Specified by:
    `getRack` in class `AbstractNetworkTopologySnitch`
  Parameters:
    `endpoint` - a specified endpoint
  Returns:
    string of rack

### getDatacenter

    public java.lang.String getDatacenter(java.net.InetAddress endpoint)

  Description copied from class: `AbstractNetworkTopologySnitch`
  Return the data center for which an endpoint resides in

  Specified by:
    `getDatacenter` in interface `IEndpointSnitch`
  Specified by:
    `getDatacenter` in class `AbstractNetworkTopologySnitch`
  Parameters:
    `endpoint` - a specified endpoint
  Returns:
    string of data center

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2012 The Apache Software Foundation