org.apache.cassandra.locator
Class RackAwareStrategy

java.lang.Object
  extended by org.apache.cassandra.locator.AbstractReplicationStrategy
      extended by org.apache.cassandra.locator.RackAwareStrategy

public class RackAwareStrategy
extends AbstractReplicationStrategy


Field Summary
 
Fields inherited from class org.apache.cassandra.locator.AbstractReplicationStrategy
logger_, partitioner_, replicas_, storagePort_, tokenMetadata_
 
Constructor Summary
RackAwareStrategy(TokenMetadata tokenMetadata, IPartitioner partitioner, int replicas, int storagePort)
           
 
Method Summary
 java.util.Map<EndPoint,EndPoint> getHintedStorageEndPointsForWrite(Token token)
           
 EndPoint[] getReadStorageEndPoints(Token token)
           
 EndPoint[] getReadStorageEndPoints(Token token, java.util.Map<Token,EndPoint> tokenToEndPointMap)
           
 EndPoint[] getWriteStorageEndPoints(Token token)
           
 
Methods inherited from class org.apache.cassandra.locator.AbstractReplicationStrategy
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

getReadStorageEndPoints

public EndPoint[] getReadStorageEndPoints(Token token)
Specified by:
getReadStorageEndPoints in class AbstractReplicationStrategy

getReadStorageEndPoints

public EndPoint[] getReadStorageEndPoints(Token token,
                                          java.util.Map<Token,EndPoint> tokenToEndPointMap)
Specified by:
getReadStorageEndPoints in class AbstractReplicationStrategy

getWriteStorageEndPoints

public EndPoint[] getWriteStorageEndPoints(Token token)
Specified by:
getWriteStorageEndPoints in class AbstractReplicationStrategy

getHintedStorageEndPointsForWrite

public java.util.Map<EndPoint,EndPoint> getHintedStorageEndPointsForWrite(Token token)


Copyright © 2009 The Apache Software Foundation