I - The intercepted method invocationpublic abstract class AbstractCacheResultInterceptor<I> extends AbstractKeyedCacheInterceptor<I,CacheResultMethodDetails>
CacheResult| Constructor and Description |
|---|
AbstractCacheResultInterceptor() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
cacheException(javax.cache.Cache<Object,Throwable> exceptionCache,
javax.cache.annotation.GeneratedCacheKey cacheKey,
javax.cache.annotation.CacheResult cacheResultAnnotation,
Throwable t)
Cache the exception if exception caching is enabled.
|
Object |
cacheResult(CacheContextSource<I> cacheContextSource,
I invocation)
Handles the
Cache.get(Object) and Cache.put(Object, Object) logic as specified for the
CacheResult annotation |
protected void |
checkForCachedException(javax.cache.Cache<Object,Throwable> exceptionCache,
javax.cache.annotation.GeneratedCacheKey cacheKey)
Check to see if there is a cached exception that needs to be re-thrown
|
protected javax.cache.Cache<Object,Throwable> |
getExceptionCache(InternalCacheKeyInvocationContext<? extends Annotation> cacheKeyInvocationContext,
CacheResultMethodDetails methodDetails)
Get the exception cache if one is configured
|
getStaticCacheKeyInvocationContextproceedpublic final Object cacheResult(CacheContextSource<I> cacheContextSource, I invocation) throws Throwable
Cache.get(Object) and Cache.put(Object, Object) logic as specified for the
CacheResult annotationcacheContextSource - The intercepted invocationinvocation - The intercepted invocationAbstractCacheInterceptor.proceed(Object)Throwable - if AbstractCacheInterceptor.proceed(Object) threwprotected void checkForCachedException(javax.cache.Cache<Object,Throwable> exceptionCache, javax.cache.annotation.GeneratedCacheKey cacheKey) throws Throwable
exceptionCache - The exception cache, may be null if no exception caching is being donecacheKey - The cache keyThrowable - The cached exceptionprotected void cacheException(javax.cache.Cache<Object,Throwable> exceptionCache, javax.cache.annotation.GeneratedCacheKey cacheKey, javax.cache.annotation.CacheResult cacheResultAnnotation, Throwable t)
exceptionCache - The exception cache, may be null if no exception caching is being donecacheKey - The cache keycacheResultAnnotation - The cache result annotationt - The exception to cacheprotected javax.cache.Cache<Object,Throwable> getExceptionCache(InternalCacheKeyInvocationContext<? extends Annotation> cacheKeyInvocationContext, CacheResultMethodDetails methodDetails)
cacheKeyInvocationContext - The invocation detailsmethodDetails - The method detailsCopyright © 2019. All rights reserved.