|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.wanghy.cache.interceptor.AbstractNameMatchCacheAttributeSource
Template for classes that allow attributes to be matched by registered name.
| Field Summary | |
private Map |
attributeMap
Map containing instances of . |
private static Log |
logger
Message Logger. |
| Constructor Summary | |
AbstractNameMatchCacheAttributeSource()
Constructor. |
|
| Method Summary | |
protected void |
addAttribute(String methodName,
CacheAttribute cacheAttribute)
Add an attribute for a caching method. |
protected Map |
getAttributeMap()
Returns an unmodifiable view of . |
protected CacheAttribute |
getCacheAttribute(Method method)
Returns an instance of for the
intercepted method. |
protected abstract PropertyEditor |
getCacheAttributeEditor()
Returns a property editor that creates instances of . |
protected boolean |
isMatch(String methodName,
String mappedName)
Returns true if the given method name matches the mapped
name. |
void |
setProperties(Properties cacheAttributes)
Parses the given properties into a name/attribute map. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
private static Log logger
private Map attributeMap
CacheAttribute. The key
of each entry is the name of the method to attach the attribute to.
| Constructor Detail |
public AbstractNameMatchCacheAttributeSource()
| Method Detail |
protected final void addAttribute(String methodName,
CacheAttribute cacheAttribute)
methodName - the name of the methodcacheAttribute - attribute associated with the methodprotected final Map getAttributeMap()
attributeMap.
attributeMap.protected abstract PropertyEditor getCacheAttributeEditor()
CacheAttribute.
protected boolean isMatch(String methodName,
String mappedName)
true if the given method name matches the mapped
name. The default implementation checks for "xxx*" and "*xxx" matches.
methodName - the method name of the class.mappedName - the name in the descriptor.
true if the names match.public final void setProperties(Properties cacheAttributes)
CacheAttribute..
cacheAttributes - the given properties.protected final CacheAttribute getCacheAttribute(Method method)
CacheAttribute for the
intercepted method.
method - the definition of the intercepted method.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||