Interface CachingProxy.KeyGenerator

  • Enclosing class:
    CachingProxy

    public static interface CachingProxy.KeyGenerator
    An interface for generating cache keys used by the caching invocation handler to cache method results
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static CachingProxy.KeyGenerator DEFAULT
      Default implementation uses the method and argument parameters to generate a cache key
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      CacheKey generate​(java.lang.Object target, java.lang.reflect.Method method, java.lang.Object[] args)
      Generate a cache key for the provided target object, method, and arguments.
    • Field Detail

      • DEFAULT

        static final CachingProxy.KeyGenerator DEFAULT
        Default implementation uses the method and argument parameters to generate a cache key
    • Method Detail

      • generate

        CacheKey generate​(java.lang.Object target,
                          java.lang.reflect.Method method,
                          java.lang.Object[] args)
        Generate a cache key for the provided target object, method, and arguments.
        Parameters:
        target - the target object
        method - the target method
        args - the arguments passed to the target method
        Returns:
        a cache key instance