Class KetamaNodeKeyFormatter


  • public class KetamaNodeKeyFormatter
    extends java.lang.Object
    Known key formats used in Ketama for assigning nodes around the ring
    • Constructor Detail

      • KetamaNodeKeyFormatter

        public KetamaNodeKeyFormatter()
    • Method Detail

      • getKeyForNode

        public 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