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
FieldsModifier and TypeFieldDescription(package private) com.hazelcast.core.HazelcastInstanceprivate static final long -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanbypassInterception(ChenileExchange exchange) Over-ride this to bypass interception in special circumstancesvoidexecute(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 CacheKeygenerate(ChenileExchange exchange) getCache(ChenileExchange exchange) private Objectkey(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:BaseChenileInterceptorIf 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:
executein interfaceCommand<ChenileExchange>- Overrides:
executein classBaseChenileInterceptor- Throws:
Exception
-
bypassInterception
Description copied from class:BaseChenileInterceptorOver-ride this to bypass interception in special circumstances- Overrides:
bypassInterceptionin classBaseChenileInterceptor- Returns:
-
getCache
-
generate
-
key
-