Class ClusterSlotHashUtil

java.lang.Object
org.springframework.data.redis.connection.ClusterSlotHashUtil

public final class ClusterSlotHashUtil extends Object
Since:
1.7
Author:
Christoph Strobl
  • Method Details

    • isSameSlotForAllKeys

      public static boolean isSameSlotForAllKeys(Collection<ByteBuffer> keys)
      Parameters:
      keys - must not be null.
      Returns:
      Since:
      2.0
    • isSameSlotForAllKeys

      public static boolean isSameSlotForAllKeys(ByteBuffer... keys)
      Parameters:
      keys - must not be null.
      Returns:
      Since:
      2.0
    • isSameSlotForAllKeys

      public static boolean isSameSlotForAllKeys(byte[]... keys)
      Parameters:
      keys - must not be null.
      Returns:
    • calculateSlot

      public static int calculateSlot(String key)
      Calculate the slot from the given key.
      Parameters:
      key - must not be null or empty.
      Returns:
    • calculateSlot

      public static int calculateSlot(byte[] key)
      Calculate the slot from the given key.
      Parameters:
      key - must not be null.
      Returns: