Package net.spy.memcached
Class KetamaNodeKeyFormatter
java.lang.Object
net.spy.memcached.KetamaNodeKeyFormatter
Known key formats used in Ketama for assigning nodes around the ring
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final KetamaNodeKeyFormatter.Format
private Map
<MemcachedNode, String> -
Constructor Summary
ConstructorsConstructorDescription -
Method Summary
Modifier and TypeMethodDescriptiongetKeyForNode
(MemcachedNode node, int repetition) Returns a uniquely identifying key, suitable for hashing by the KetamaNodeLocator algorithm.
-
Field Details
-
format
-
nodeKeys
-
-
Constructor Details
-
KetamaNodeKeyFormatter
public KetamaNodeKeyFormatter() -
KetamaNodeKeyFormatter
-
-
Method Details
-
getFormat
-
getKeyForNode
Returns a uniquely identifying key, suitable for hashing by the KetamaNodeLocator algorithm.- Parameters:
node
- The MemcachedNode to use to form the unique identifierrepetition
- 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
-