org.apache.cassandra.locator
Class RackAwareStrategy

java.lang.Object
  extended by org.apache.cassandra.locator.AbstractStrategy
      extended by org.apache.cassandra.locator.RackAwareStrategy
All Implemented Interfaces:
IReplicaPlacementStrategy

public class RackAwareStrategy
extends AbstractStrategy


Field Summary
 
Fields inherited from class org.apache.cassandra.locator.AbstractStrategy
logger_, partitioner_, replicas_, storagePort_, tokenMetadata_
 
Constructor Summary
RackAwareStrategy(TokenMetadata tokenMetadata, IPartitioner partitioner, int replicas, int storagePort)
           
 
Method Summary
 java.util.Map<java.lang.String,EndPoint[]> getStorageEndPoints(java.lang.String[] keys)
           
 EndPoint[] getStorageEndPoints(Token token)
           
 EndPoint[] getStorageEndPoints(Token token, java.util.Map<Token,EndPoint> tokenToEndPointMap)
           
 
Methods inherited from class org.apache.cassandra.locator.AbstractStrategy
getHintedStorageEndPoints, getNextAvailableEndPoint, retrofitPorts
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RackAwareStrategy

public RackAwareStrategy(TokenMetadata tokenMetadata,
                         IPartitioner partitioner,
                         int replicas,
                         int storagePort)
Method Detail

getStorageEndPoints

public EndPoint[] getStorageEndPoints(Token token)
Specified by:
getStorageEndPoints in interface IReplicaPlacementStrategy
Specified by:
getStorageEndPoints in class AbstractStrategy

getStorageEndPoints

public java.util.Map<java.lang.String,EndPoint[]> getStorageEndPoints(java.lang.String[] keys)

getStorageEndPoints

public EndPoint[] getStorageEndPoints(Token token,
                                      java.util.Map<Token,EndPoint> tokenToEndPointMap)


Copyright © 2009 The Apache Software Foundation