org.apache.cassandra.locator

## Class TokenMetadata.Topology

- java.lang.Object
- - org.apache.cassandra.locator.TokenMetadata.Topology

Enclosing class:
  TokenMetadata

    public static class TokenMetadata.Topology
    extends java.lang.Object

Tracks the assignment of racks and endpoints in each datacenter for all the "normal" endpoints in this TokenMetadata. This allows faster calculation of endpoints in NetworkTopologyStrategy.

### Method Summary

All Methods Instance Methods Concrete Methods
`com.google.common.collect.Multimap<java.lang.String,java.net.InetAddress>` `getDatacenterEndpoints()`
`java.util.Map<java.lang.String,com.google.common.collect.Multimap<java.lang.String,java.net.InetAddress>>` `getDatacenterRacks()`
`Pair<java.lang.String,java.lang.String>` `getLocation(java.net.InetAddress addr)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Method Detail

#### getDatacenterEndpoints

    public com.google.common.collect.Multimap<java.lang.String,java.net.InetAddress> getDatacenterEndpoints()

Returns:
  multi-map of DC to endpoints in that DC

#### getDatacenterRacks

    public java.util.Map<java.lang.String,com.google.common.collect.Multimap<java.lang.String,java.net.InetAddress>> getDatacenterRacks()

Returns:
  map of DC to multi-map of rack to endpoints in that rack

#### getLocation

    public Pair<java.lang.String,java.lang.String> getLocation(java.net.InetAddress addr)

Returns:
  The DC and rack of the given endpoint.