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 RF nodes that lie right next to each other on the ring.


Field Summary
 
Fields inherited from class org.apache.cassandra.locator.AbstractReplicationStrategy
configOptions, snitch, table
 
Constructor Summary
RackUnawareStrategy(java.lang.String table, TokenMetadata tokenMetadata, IEndpointSnitch snitch, java.util.Map<java.lang.String,java.lang.String> configOptions)
           
 
Method Summary
 java.util.Set<java.net.InetAddress> calculateNaturalEndpoints(Token token, TokenMetadata metadata)
          calculate the natural endpoints for the given token
 
Methods inherited from class org.apache.cassandra.locator.AbstractReplicationStrategy
clearCachedEndpoints, createReplicationStrategy, createReplicationStrategy, getAddressRanges, getAddressRanges, getHintedEndpoints, getNaturalEndpoints, getPendingAddressRanges, getQuorumResponseHandler, getRangeAddresses, getWriteResponseHandler, invalidateCachedSnitchValues, invalidateCachedTokenEndpointValues
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RackUnawareStrategy

public RackUnawareStrategy(java.lang.String table,
                           TokenMetadata tokenMetadata,
                           IEndpointSnitch snitch,
                           java.util.Map<java.lang.String,java.lang.String> configOptions)
Method Detail

calculateNaturalEndpoints

public java.util.Set<java.net.InetAddress> calculateNaturalEndpoints(Token token,
                                                                     TokenMetadata metadata)
Description copied from class: AbstractReplicationStrategy
calculate the natural endpoints for the given token

Specified by:
calculateNaturalEndpoints in class AbstractReplicationStrategy
Parameters:
token - the token the natural endpoints are requested for
Returns:
a copy of the natural endpoints for the given token
See Also:
AbstractReplicationStrategy.getNaturalEndpoints(org.apache.cassandra.dht.Token)


Copyright © 2010 The Apache Software Foundation