net.spy.memcached.util
Interface KetamaNodeLocatorConfiguration

All Known Implementing Classes:
DefaultKetamaNodeLocatorConfiguration

public interface KetamaNodeLocatorConfiguration

Defines the set of all configuration dependencies required for the KetamaNodeLocator algorithm to run.


Method Summary
 java.lang.String getKeyForNode(MemcachedNode node, int repetition)
          Returns a uniquely identifying key, suitable for hashing by the KetamaNodeLocator algorithm.
 int getNodeRepetitions()
          Returns the number of discrete hashes that should be defined for each node in the continuum.
 

Method Detail

getKeyForNode

java.lang.String getKeyForNode(MemcachedNode node,
                               int repetition)
Returns a uniquely identifying key, suitable for hashing by the KetamaNodeLocator algorithm.

Parameters:
node - The MemcachedNode to use to form the unique identifier
repetition - The repetition number for the particular node in question (0 is the first repetition)
Returns:
The key that represents the specific repetition of the node

getNodeRepetitions

int getNodeRepetitions()
Returns the number of discrete hashes that should be defined for each node in the continuum.

Returns:
a value greater than 0


Copyright © 2006-2009 Dustin Sallings, 2009-2012 Couchbase, Inc.