org.apache.cassandra.locator
Class TokenMetadata.Topology

java.lang.Object
  extended by 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.


Constructor Summary
protected TokenMetadata.Topology()
           
protected TokenMetadata.Topology(TokenMetadata.Topology other)
          construct deep-copy of other
 
Method Summary
protected  void addEndpoint(java.net.InetAddress ep)
          Stores current DC/rack assignment for ep
protected  void clear()
           
 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()
           
protected  void removeEndpoint(java.net.InetAddress ep)
          Removes current DC/rack assignment for ep
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TokenMetadata.Topology

protected TokenMetadata.Topology()

TokenMetadata.Topology

protected TokenMetadata.Topology(TokenMetadata.Topology other)
construct deep-copy of other

Method Detail

clear

protected void clear()

addEndpoint

protected void addEndpoint(java.net.InetAddress ep)
Stores current DC/rack assignment for ep


removeEndpoint

protected void removeEndpoint(java.net.InetAddress ep)
Removes current DC/rack assignment for ep


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


Copyright © 2012 The Apache Software Foundation