Class ClusterSlotHashUtil
java.lang.Object
org.springframework.data.redis.connection.ClusterSlotHashUtil
- Since:
- 1.7
- Author:
- Christoph Strobl
-
Method Summary
Modifier and TypeMethodDescriptionstatic int
calculateSlot
(byte[] key) Calculate the slot from the given key.static int
calculateSlot
(String key) Calculate the slot from the given key.static boolean
isSameSlotForAllKeys
(byte[]... keys) static boolean
isSameSlotForAllKeys
(ByteBuffer... keys) static boolean
-
Method Details
-
isSameSlotForAllKeys
- Parameters:
keys
- must not be null.- Returns:
- Since:
- 2.0
-
isSameSlotForAllKeys
- 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
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:
-