org.apache.cassandra.locator
Class AbstractStrategy

java.lang.Object
  extended by org.apache.cassandra.locator.AbstractStrategy
All Implemented Interfaces:
IReplicaPlacementStrategy
Direct Known Subclasses:
RackAwareStrategy, RackUnawareStrategy

public abstract class AbstractStrategy
extends java.lang.Object
implements IReplicaPlacementStrategy

This class contains a helper method that will be used by all abstraction that implement the IReplicaPlacementStrategy interface.


Field Summary
protected static org.apache.log4j.Logger logger_
           
protected  IPartitioner partitioner_
           
protected  int replicas_
           
protected  int storagePort_
           
protected  TokenMetadata tokenMetadata_
           
 
Method Summary
 java.util.Map<EndPoint,EndPoint> getHintedStorageEndPoints(Token token)
           
protected  EndPoint getNextAvailableEndPoint(EndPoint startPoint, java.util.List<EndPoint> topN, java.util.List<EndPoint> liveNodes)
           
abstract  EndPoint[] getStorageEndPoints(Token token)
           
protected  void retrofitPorts(java.util.List<EndPoint> eps)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.cassandra.locator.IReplicaPlacementStrategy
getStorageEndPoints, getStorageEndPoints
 

Field Detail

logger_

protected static org.apache.log4j.Logger logger_

tokenMetadata_

protected TokenMetadata tokenMetadata_

partitioner_

protected IPartitioner partitioner_

replicas_

protected int replicas_

storagePort_

protected int storagePort_
Method Detail

retrofitPorts

protected void retrofitPorts(java.util.List<EndPoint> eps)

getNextAvailableEndPoint

protected EndPoint getNextAvailableEndPoint(EndPoint startPoint,
                                            java.util.List<EndPoint> topN,
                                            java.util.List<EndPoint> liveNodes)

getHintedStorageEndPoints

public java.util.Map<EndPoint,EndPoint> getHintedStorageEndPoints(Token token)
Specified by:
getHintedStorageEndPoints in interface IReplicaPlacementStrategy

getStorageEndPoints

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


Copyright © 2009 The Apache Software Foundation