Package com.oracle.coherence.cdi
Class CacheGetInterceptor
java.lang.Object
com.oracle.coherence.cdi.AbstractCacheInterceptor
com.oracle.coherence.cdi.CacheGetInterceptor
A CDI interceptor that returns cached value if present; otherwise it
returns and caches result of target method invocation.
-
Constructor Summary
ConstructorsConstructorDescriptionCacheGetInterceptor(Coherence coherence, CoherenceExtension extension) Create theCacheGetInterceptor -
Method Summary
Methods inherited from class com.oracle.coherence.cdi.AbstractCacheInterceptor
getCoherence, getExtension, getSession
-
Constructor Details
-
CacheGetInterceptor
Create theCacheGetInterceptor- Parameters:
coherence- the Coherence instanceextension- the Coherence CDI extension
-
-
Method Details
-
cacheGet
Returns cached value if available; otherwise invokes target method and stores invocation result in the cache before returning it.- Parameters:
ctxInvocation- the invocation context- Returns:
- the cached value if available; otherwise returns the result of the invocation of the target method
- Throws:
Exception- if thrown by target method
-