JCacheInterceptor
or an AspectJ aspect.
Use the Spring caching abstraction for cache-related operations. No JSR-107
javax. or javax. are required to
process standard JSR-107 cache annotations.
The JCacheOperationSource is used for determining caching operations
A cache aspect is serializable if its JCacheOperationSource is serializable.
org.springframework.cache.interceptor.CacheAspectSupport , KeyGeneratorAdapter, CacheResolverAdapter
| Modifier and Type | Class and Description |
|---|---|
| private class |
| Modifier and Type | Field and Description |
|---|---|
| private JCacheOperationSource | |
| private CachePutInterceptor | |
| private CacheRemoveAllInterceptor | |
| private CacheRemoveEntryInterceptor | |
| private CacheResultInterceptor | |
| private boolean | |
| protected final Log |
| Access | Constructor and Description |
|---|---|
| public |
| 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. |
| private CacheOperationInvocationContext | |
| protected Object | |
| private Object | |
| public JCacheOperationSource | |
| protected Object | Returns: the result of the invocationthe invoker handling the operation being cached invoker)Execute the underlying operation (typically in case of cache miss) and return the result of the invocation. |
| public void | setCacheOperationSource(JCacheOperationSource cacheOperationSource)
Set the CacheOperationSource for this cache aspect. |
| cacheOperationSource | back to summary |
|---|---|
| private JCacheOperationSource cacheOperationSource
| |
| cachePutInterceptor | back to summary |
|---|---|
| private CachePutInterceptor cachePutInterceptor
| |
| cacheRemoveAllInterceptor | back to summary |
|---|---|
| private CacheRemoveAllInterceptor cacheRemoveAllInterceptor
| |
| cacheRemoveEntryInterceptor | back to summary |
|---|---|
| private CacheRemoveEntryInterceptor cacheRemoveEntryInterceptor
| |
| cacheResultInterceptor | back to summary |
|---|---|
| private CacheResultInterceptor cacheResultInterceptor
| |
| initialized | back to summary |
|---|---|
| private boolean initialized | |
| logger | back to summary |
|---|---|
| protected final Log logger | |
| JCacheAspectSupport | back to summary |
|---|---|
| public JCacheAspectSupport() | |
| 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.
| |
| createCacheOperationInvocationContext | back to summary |
|---|---|
private CacheOperationInvocationContext
| |
| execute | back to summary |
|---|---|
protected Object execute(CacheOperationInvoker invoker, Object target, Method method, Object[] args)
| |
| execute | back to summary |
|---|---|
private Object execute(CacheOperationInvocationContext<?> context, CacheOperationInvoker invoker)
| |
| getCacheOperationSource | back to summary |
|---|---|
| public JCacheOperationSource getCacheOperationSource() Return the CacheOperationSource for this cache aspect. | |
| invokeOperation | back to summary |
|---|---|
| protected Object invokeOperation(CacheOperationInvoker invoker) Execute the underlying operation (typically in case of cache miss) and return
the result of the invocation. If an exception occurs it will be wrapped in
a
| |
| setCacheOperationSource | back to summary |
|---|---|
| public void setCacheOperationSource(JCacheOperationSource cacheOperationSource) Set the CacheOperationSource for this cache aspect. | |
| Modifier and Type | Field and Description |
|---|---|
| private final CacheOperationInvoker |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public Object | invoke()
Implements org. Invoke the cache operation defined by this instance. |
| delegate | back to summary |
|---|---|
| private final CacheOperationInvoker delegate | |
| CacheOperationInvokerAdapter | back to summary |
|---|---|
| public CacheOperationInvokerAdapter(CacheOperationInvoker delegate) | |
| invoke | back to summary |
|---|---|
| public Object invoke() throws ThrowableWrapper Implements org. Doc from org. Invoke the cache operation defined by this instance. Wraps any exception
that is thrown during the invocation in a
| |