CacheManager, exposing transaction-aware Cache objects
which synchronize their Cache#put operations with Spring-managed transactions
(through Spring's org.springframework.transaction.support.TransactionSynchronizationManager ),
performing the actual cache put operation only in the after-commit phase of a successful transaction.
If no transaction is active, Cache#put operations will be performed immediately, as usual.
setTargetCacheManager, TransactionAwareCacheDecorator, org.springframework.transaction.support.TransactionSynchronizationManager
| Modifier and Type | Field and Description |
|---|---|
| private CacheManager |
| Access | Constructor and Description |
|---|---|
| public | TransactionAwareCacheManagerProxy()
Create a new TransactionAwareCacheManagerProxy, setting the target CacheManager
through the |
| public | TransactionAwareCacheManagerProxy(CacheManager
the target CacheManager to proxy targetCacheManager)Create a new TransactionAwareCacheManagerProxy for the given target CacheManager. |
| Modifier and Type | Method and Description |
|---|---|
| public void | afterPropertiesSet()
Implements org. Invoked by the containing This method allows the bean instance to perform validation of its overall configuration and final initialization when all bean properties have been set. |
| public Cache | getCache(String
the cache identifier (must not be name)null)Implements org. Get the cache associated with the given name. |
| public Collection | getCacheNames()
Implements org. Get a collection of the cache names known by this manager. |
| public void |
| targetCacheManager | back to summary |
|---|---|
| private CacheManager targetCacheManager
| |
| TransactionAwareCacheManagerProxy | back to summary |
|---|---|
| public TransactionAwareCacheManagerProxy() Create a new TransactionAwareCacheManagerProxy, setting the target CacheManager
through the | |
| TransactionAwareCacheManagerProxy | back to summary |
|---|---|
| public TransactionAwareCacheManagerProxy(CacheManager targetCacheManager) Create a new TransactionAwareCacheManagerProxy for the given target CacheManager.
| |
| afterPropertiesSet | back to summary |
|---|---|
| public void afterPropertiesSet() Implements org. Doc from org. Invoked by the containing This method allows the bean instance to perform validation of its overall configuration and final initialization when all bean properties have been set.
| |
| getCache | back to summary |
|---|---|
| public Cache getCache(String name) Implements org. Doc from org. Get the cache associated with the given name. Note that the cache may be lazily created at runtime if the native provider supports it. | |
| getCacheNames | back to summary |
|---|---|
| public Collection Implements org. Doc from org. Get a collection of the cache names known by this manager.
| |
| setTargetCacheManager | back to summary |
|---|---|
| public void setTargetCacheManager(CacheManager targetCacheManager) Set the target CacheManager to proxy. | |