Class SlotKeys

java.lang.Object
com.reve.redis.cluster.slot.SlotKeys

public class SlotKeys extends Object
This class contains all 16384 keys, each of them pointing to different key slot. And keys are appended in serialized manner. SlotKeys.getKeyForSlot(slotNumber) will return a String key that maps to slotNumber slot
  • Constructor Details

    • SlotKeys

      public SlotKeys()
  • Method Details

    • getKeyForSlot

      public static String getKeyForSlot(int slot)
      Returns a unique key pointing to the corresponding slot
      Parameters:
      slot - is the slot number
      Returns:
      String key that maps to @param{slot}
    • getTotalKeySize

      public static int getTotalKeySize()
      Returns:
      the size of available keys