类 AbstractTransactionSupportingCacheManager
- java.lang.Object
- org.springframework.cache.support.AbstractCacheManager
- org.springframework.cache.transaction.AbstractTransactionSupportingCacheManager
- 所有已实现的接口:
InitializingBean
,CacheManager
public abstract class AbstractTransactionSupportingCacheManager extends AbstractCacheManager
Base class for CacheManager implementations that want to support built-in awareness of Spring-managed transactions. This usually needs to be switched on explicitly through thesetTransactionAware(boolean)
bean property.- 从以下版本开始:
- 3.2
- 作者:
- Juergen Hoeller
- 另请参阅:
setTransactionAware(boolean)
,TransactionAwareCacheDecorator
,TransactionAwareCacheManagerProxy
构造器概要
构造器 构造器 说明 AbstractTransactionSupportingCacheManager()
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 protected Cache
decorateCache(Cache cache)
Decorate the given Cache object if necessary.boolean
isTransactionAware()
Return whether this CacheManager has been configured to be transaction-aware.void
setTransactionAware(boolean transactionAware)
Set whether this CacheManager should expose transaction-aware Cache objects.从类继承的方法 org.springframework.cache.support.AbstractCacheManager
addCache, afterPropertiesSet, getCache, getCacheNames, getMissingCache, initializeCaches, loadCaches, lookupCache
构造器详细资料
AbstractTransactionSupportingCacheManager
public AbstractTransactionSupportingCacheManager()
方法详细资料
setTransactionAware
public void setTransactionAware(boolean transactionAware)
Set whether this CacheManager should expose transaction-aware Cache objects.Default is "false". Set this to "true" to synchronize cache put/evict operations with ongoing Spring-managed transactions, performing the actual cache put/evict operation only in the after-commit phase of a successful transaction.
isTransactionAware
public boolean isTransactionAware()
Return whether this CacheManager has been configured to be transaction-aware.
decorateCache
protected Cache decorateCache(Cache cache)
从类复制的说明:AbstractCacheManager
Decorate the given Cache object if necessary.- 覆盖:
decorateCache
在类中AbstractCacheManager
- 参数:
cache
- the Cache object to be added to this CacheManager- 返回:
- the decorated Cache object to be used instead, or simply the passed-in Cache object by default