Class KeyUtils

java.lang.Object
org.springframework.data.redis.util.KeyUtils

public abstract class KeyUtils extends Object
Utility class for Redis keys.
Since:
4.1
Author:
Mark Paluch
  • Method Details

    • splitKeys

      public static <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.
      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.