类 AbstractCacheResolver

java.lang.Object
cn.taketoday.cache.interceptor.AbstractCacheResolver
所有已实现的接口:
InitializingBean, CacheResolver
直接已知子类:
NamedCacheResolver, SimpleCacheResolver

public abstract class AbstractCacheResolver extends Object implements CacheResolver, InitializingBean
A base CacheResolver implementation that requires the concrete implementation to provide the collection of cache name(s) based on the invocation context.
从以下版本开始:
4.0
作者:
Stephane Nicoll, Juergen Hoeller
  • 构造器详细资料

  • 方法详细资料

    • setCacheManager

      public void setCacheManager(CacheManager cacheManager)
      Set the CacheManager that this instance should use.
    • getCacheManager

      public CacheManager getCacheManager()
      Return the CacheManager that this instance uses.
    • afterPropertiesSet

      public void afterPropertiesSet()
      指定者:
      afterPropertiesSet 在接口中 InitializingBean
    • resolveCaches

      public Collection<? extends Cache> resolveCaches(CacheOperationInvocationContext<?> context)
      从接口复制的说明: CacheResolver
      Return the cache(s) to use for the specified invocation.
      指定者:
      resolveCaches 在接口中 CacheResolver
      参数:
      context - the context of the particular invocation
      返回:
      the cache(s) to use (never null)
    • getCacheNames

      @Nullable protected abstract Collection<String> getCacheNames(CacheOperationInvocationContext<?> context)
      Provide the name of the cache(s) to resolve against the current cache manager.

      It is acceptable to return null to indicate that no cache could be resolved for this invocation.

      参数:
      context - the context of the particular invocation
      返回:
      the cache name(s) to resolve, or null if no cache should be resolved