类 SimpleKeyGenerator

java.lang.Object
cn.taketoday.cache.interceptor.SimpleKeyGenerator
所有已实现的接口:
KeyGenerator

public class SimpleKeyGenerator extends Object implements KeyGenerator
Simple key generator. Returns the parameter itself if a single non-null value is given, otherwise returns a SimpleKey of the parameters.

No collisions will occur with the keys generated by this class. The returned SimpleKey object can be safely used with a ConcurrentMapCache, however, might not be suitable for all Cache implementations.

从以下版本开始:
4.0
作者:
Phillip Webb, Juergen Hoeller
另请参阅:
  • 构造器详细资料

    • SimpleKeyGenerator

      public SimpleKeyGenerator()
  • 方法详细资料

    • generate

      public Object generate(Object target, Method method, Object... params)
      从接口复制的说明: KeyGenerator
      Generate a key for the given method and its parameters.
      指定者:
      generate 在接口中 KeyGenerator
      参数:
      target - the target instance
      method - the method being called
      params - the method parameters (with any var-args expanded)
      返回:
      a generated key
    • generateKey

      public static Object generateKey(Object... params)
      Generate a key based on the specified parameters.