public class DefaultKetamaNodeLocatorConfiguration extends java.lang.Object implements KetamaNodeLocatorConfiguration
| Constructor and Description |
|---|
DefaultKetamaNodeLocatorConfiguration()
Create a KetamaNodeLocatorConfiguraiton with the default SPYMEMCACHED node
key format
|
DefaultKetamaNodeLocatorConfiguration(KetamaNodeKeyFormatter nodeKeyFormatter)
Create a KetamaNodeLocatorConfiguraiton
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getKeyForNode(MemcachedNode node,
int repetition)
Delegates to the KetamaNodeKeyFormatter
|
int |
getNodeRepetitions()
Returns the number of discrete hashes that should be defined for each node
in the continuum.
|
public DefaultKetamaNodeLocatorConfiguration()
public DefaultKetamaNodeLocatorConfiguration(KetamaNodeKeyFormatter nodeKeyFormatter)
nodeKeyFormatter - Ketama node key format, either SPYMEMCACHED or LIBMEMCACHEDpublic int getNodeRepetitions()
getNodeRepetitions in interface KetamaNodeLocatorConfigurationpublic java.lang.String getKeyForNode(MemcachedNode node, int repetition)
getKeyForNode in interface KetamaNodeLocatorConfigurationnode - The MemcachedNode to use to form the unique identifierrepetition - The repetition number for the particular node in question
(0 is the first repetition)Copyright © 2006-2009 Dustin Sallings, 2009-2013 Couchbase, Inc.