org.wanghy.cache.interceptor.flush
Class CacheFlushAttributeSourceAdvisor
java.lang.Object
org.springframework.aop.support.StaticMethodMatcher
org.springframework.aop.support.StaticMethodMatcherPointcut
org.springframework.aop.support.StaticMethodMatcherPointcutAdvisor
org.wanghy.cache.interceptor.flush.CacheFlushAttributeSourceAdvisor
- All Implemented Interfaces:
- Advisor, MethodMatcher, Ordered, Pointcut, PointcutAdvisor, Serializable
- public class CacheFlushAttributeSourceAdvisor
- extends StaticMethodMatcherPointcutAdvisor
Advisor driven by a CacheFlushAttributeSource
that
points to CacheFlushInterceptor
the methods that
should be intercepted.
- Version:
- $Revision: 1.4 $ $Date: 2005/03/03 02:05:32 $
- Author:
- Alex Ruiz
- See Also:
- Serialized Form
Fields inherited from interface org.springframework.aop.Pointcut |
TRUE |
Method Summary |
boolean |
matches(Method method,
Class targetClass)
Returns true if the intercepted method should flush the
cache. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.springframework.aop.Pointcut |
|
Methods inherited from interface org.springframework.aop.MethodMatcher |
|
serialVersionUID
private static final long serialVersionUID
- Version number of this class.
- See Also:
Serializable
,
Constant Field Values
cacheFlushAttributeSource
private CacheFlushAttributeSource cacheFlushAttributeSource
- Retrieves instances of
FlushCache
for intercepted
methods.
CacheFlushAttributeSourceAdvisor
public CacheFlushAttributeSourceAdvisor(CacheFlushInterceptor cacheInterceptor)
- Constructor.
- Parameters:
cacheInterceptor
- Advice that caches the returned values of intercepted methods.
- Throws:
AopConfigException
- if the CacheFlushAttributeSource
of
cacheInterceptor
is null
.
matches
public final boolean matches(Method method,
Class targetClass)
- Returns
true
if the intercepted method should flush the
cache.
- Parameters:
method
- the intercepted method to verify.targetClass
- the class declaring the method.
- Returns:
true
if the specified method should flush the cache.
Copyright © 2004-2005 Alex Ruiz. All Rights Reserved.