Package org.chenile.cache.interceptor
Class CacheInterceptor
java.lang.Object
org.chenile.core.interceptors.BaseChenileInterceptor
org.chenile.cache.interceptor.CacheInterceptor
- All Implemented Interfaces:
Serializable
,Command<ChenileExchange>
Caches an operation return value using the service name, operation name and the parameters
that were passed to the operation.
This is applicable only to operations that subscribe to caching.
- Author:
- Raja Shankar Kolluru
- See Also:
-
Field Summary
Modifier and TypeFieldDescription(package private) com.hazelcast.core.HazelcastInstance
private static final long
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
bypassInterception
(ChenileExchange exchange) Over-ride this to bypass interception in special circumstancesvoid
execute
(ChenileExchange exchange) If this method is over-ridden, make sure that you call doContinue unless you want to end the chain here! This is very important.private CacheKey
generate
(ChenileExchange exchange) getCache
(ChenileExchange exchange) private Object
key
(ChenileExchange exchange, ParamDefinition p) Methods inherited from class org.chenile.core.interceptors.BaseChenileInterceptor
doContinue, doPostProcessing, doPreProcessing, getExtensionByAnnotation, getExtensionByAnnotation, resumeFromSavedPoint, savePoint
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
hazelcastInstance
-
-
Constructor Details
-
CacheInterceptor
public CacheInterceptor()
-
-
Method Details
-
execute
Description copied from class:BaseChenileInterceptor
If this method is over-ridden, make sure that you call doContinue unless you want to end the chain here! This is very important. Also, if there is an exception downstream it needs to be handled here after a call toBaseChenileInterceptor.doContinue(ChenileExchange)
In most cases, you will do fine overridingBaseChenileInterceptor.doPreProcessing(ChenileExchange)
andBaseChenileInterceptor.doPostProcessing(ChenileExchange)
- Specified by:
execute
in interfaceCommand<ChenileExchange>
- Overrides:
execute
in classBaseChenileInterceptor
- Throws:
Exception
-
bypassInterception
Description copied from class:BaseChenileInterceptor
Over-ride this to bypass interception in special circumstances- Overrides:
bypassInterception
in classBaseChenileInterceptor
- Returns:
-
getCache
-
generate
-
key
-