org.apache.cassandra.locator
Class RackUnawareStrategy

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

public class RackUnawareStrategy
extends AbstractReplicationStrategy

This class returns the nodes responsible for a given key but does not respect rack awareness. Basically returns the 3 nodes that lie right next to each other on the ring.


Field Summary
 
Fields inherited from class org.apache.cassandra.locator.AbstractReplicationStrategy
logger_, partitioner_, replicas_, storagePort_, tokenMetadata_
 
Constructor Summary
RackUnawareStrategy(TokenMetadata tokenMetadata, IPartitioner partitioner, int replicas, int storagePort)
           
 
Method Summary
 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

RackUnawareStrategy

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

getReadStorageEndPoints

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

getWriteStorageEndPoints

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

getReadStorageEndPoints

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


Copyright © 2009 The Apache Software Foundation