java.lang.Object
com.erudika.para.server.aop.IndexAndCacheAspect
- All Implemented Interfaces:
org.aopalliance.aop.Advice
,org.aopalliance.intercept.Interceptor
,org.aopalliance.intercept.MethodInterceptor
public class IndexAndCacheAspect
extends Object
implements org.aopalliance.intercept.MethodInterceptor
This is the core method interceptor which enables caching and indexing.
It listens for calls to annotated
DAO
methods
and adds searching and caching functionality to them. This technique allows us to control
the caching and searching centrally for all implementations
of the DAO
interface.- Author:
- Alex Bogdanovski [[email protected]]
- See Also:
-
Constructor Summary
-
Method Summary
-
Constructor Details
-
IndexAndCacheAspect
public IndexAndCacheAspect()
-
-
Method Details
-
getSearch
- Returns:
Search
-
setSearch
- Parameters:
search
-Search
-
getCache
- Returns:
Cache
-
setCache
- Parameters:
cache
-Cache
-
invoke
Executes code when a method is invoked. A big switch statement.- Specified by:
invoke
in interfaceorg.aopalliance.intercept.MethodInterceptor
- Parameters:
mi
- method invocation- Returns:
- the returned value of the method invoked or something else (decided here)
- Throws:
Throwable
- error
-