Class KeyUtils
java.lang.Object
org.springframework.data.redis.util.KeyUtils
Utility class for Redis keys.
- Since:
- 4.1
- Author:
- Mark Paluch
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceRepresents a function that accepts two arguments of the same base type and produces a result while the second argument is an array ofT. -
Method Summary
Modifier and TypeMethodDescriptionstatic <T,R> R splitKeys(T[] keys, KeyUtils.SourceKeysFunction<T, R> function) Utility method to split an array concatenated of keys into the first key and the remaining keys and invoke the given function.
-
Method Details
-
splitKeys
Utility method to split an array concatenated of keys into the first key and the remaining keys and invoke the given function.- Parameters:
keys- array of keys to be separated into the first one and the remaining ones.function- function to be invoked with the first and remaining keys as input arguments.- Returns:
- result of the
KeyUtils.SourceKeysFunction.
-