Class ClusterSlotHashUtil
java.lang.Object
org.springframework.data.redis.connection.ClusterSlotHashUtil
- Since:
- 1.7
- Author:
- Christoph Strobl
-
Method Summary
Modifier and TypeMethodDescriptionstatic intcalculateSlot(byte[] key) Calculate the slot from the given key.static intcalculateSlot(String key) Calculate the slot from the given key.static booleanisSameSlotForAllKeys(byte[]... keys) static booleanisSameSlotForAllKeys(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:
-