org.springframework.cache.jcache.interceptor

Class AbstractFallbackJCacheOperationSource

  • java.lang.Object
    • org.springframework.cache.jcache.interceptor.AbstractFallbackJCacheOperationSource
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      protected Log logger 
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method and Description
      protected boolean allowPublicMethodsOnly()
      Should only public methods be allowed to have caching semantics?
      protected abstract JCacheOperation<?> findCacheOperation(java.lang.reflect.Method method, java.lang.Class<?> targetType)
      Subclasses need to implement this to return the caching operation for the given method, if any.
      JCacheOperation<?> getCacheOperation(java.lang.reflect.Method method, java.lang.Class<?> targetClass)
      Return the cache operations for this method, or null if the method contains no JSR-107 related metadata.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • logger

        protected final Log logger
    • Constructor Detail

      • AbstractFallbackJCacheOperationSource

        public AbstractFallbackJCacheOperationSource()
    • Method Detail

      • getCacheOperation

        public JCacheOperation<?> getCacheOperation(java.lang.reflect.Method method,
                                                    @Nullable
                                                    java.lang.Class<?> targetClass)
        Description copied from interface: JCacheOperationSource
        Return the cache operations for this method, or null if the method contains no JSR-107 related metadata.
        Specified by:
        getCacheOperation in interface JCacheOperationSource
        Parameters:
        method - the method to introspect
        targetClass - the target class (may be null, in which case the declaring class of the method must be used)
        Returns:
        the cache operation for this method, or null if none found
      • findCacheOperation

        @Nullable
        protected abstract JCacheOperation<?> findCacheOperation(java.lang.reflect.Method method,
                                                                           @Nullable
                                                                           java.lang.Class<?> targetType)
        Subclasses need to implement this to return the caching operation for the given method, if any.
        Parameters:
        method - the method to retrieve the operation for
        targetType - the target class
        Returns:
        the cache operation associated with this method (or null if none)
      • allowPublicMethodsOnly

        protected boolean allowPublicMethodsOnly()
        Should only public methods be allowed to have caching semantics?

        The default implementation returns false.