public abstract class AbstractMethodCachingBean<T>
extends java.lang.Object
Constructor and Description |
---|
AbstractMethodCachingBean() |
Modifier and Type | Method and Description |
---|---|
void |
clearAll() |
protected java.lang.Object |
clearCache(T joinPoint,
java.lang.reflect.Method method)
Clear cache.
|
protected java.lang.Object |
doCacheMethod(T joinPoint)
Cache method.
|
protected java.lang.String |
getArgumentKey(java.lang.Object argument) |
protected java.lang.String |
getArgumentKey(java.lang.Object argument,
ParameterKey key) |
protected abstract java.lang.Object[] |
getArguments(T joinPoint) |
CacheRegistry.CacheWrapper<java.lang.String,java.lang.Object> |
getCacheFromName(java.lang.String cacheName,
boolean createIfNotPresent) |
CacheRegistry |
getCacheRegistry() |
protected java.util.Map<java.lang.String,CacheRegistry.CacheWrapper<java.lang.String,java.lang.Object>> |
getCaches() |
protected java.lang.String |
getKeyFromMethod(java.lang.String className,
java.lang.String signature,
java.lang.Object[] arguments,
java.lang.annotation.Annotation[][] parameterAnnotations)
Gets the key from method.
|
LgLoggerIF |
getLogger()
Gets the logger.
|
protected abstract java.lang.reflect.Method |
getMethod(T joinPoint) |
SystemVariables |
getSystemVariables() |
protected abstract java.lang.Object |
getTarget(T joinPoint) |
protected abstract java.lang.Object |
proceed(T joinPoint) |
void |
setCacheRegistry(CacheRegistry cacheRegistry) |
void |
setLogger(LgLoggerIF logger)
Sets the logger.
|
void |
setSystemVariables(SystemVariables systemVariables) |
protected java.lang.Object clearCache(T joinPoint, java.lang.reflect.Method method) throws java.lang.Throwable
pjp
- the pjpjava.lang.Throwable
- the throwablepublic void clearAll()
protected java.lang.Object doCacheMethod(T joinPoint) throws java.lang.Throwable
pjp
- the pjpjava.lang.Throwable
- the throwableprotected abstract java.lang.reflect.Method getMethod(T joinPoint)
protected abstract java.lang.Object getTarget(T joinPoint)
protected abstract java.lang.Object proceed(T joinPoint) throws java.lang.Throwable
java.lang.Throwable
protected abstract java.lang.Object[] getArguments(T joinPoint)
public CacheRegistry.CacheWrapper<java.lang.String,java.lang.Object> getCacheFromName(java.lang.String cacheName, boolean createIfNotPresent)
protected java.lang.String getKeyFromMethod(java.lang.String className, java.lang.String signature, java.lang.Object[] arguments, java.lang.annotation.Annotation[][] parameterAnnotations)
className
- the class namesignature
- the signaturearguments
- the argumentsparameterAnnotations
- protected java.lang.String getArgumentKey(java.lang.Object argument, ParameterKey key)
protected java.lang.String getArgumentKey(java.lang.Object argument)
protected java.util.Map<java.lang.String,CacheRegistry.CacheWrapper<java.lang.String,java.lang.Object>> getCaches()
public LgLoggerIF getLogger()
public void setLogger(LgLoggerIF logger)
logger
- the new loggerpublic SystemVariables getSystemVariables()
public void setSystemVariables(SystemVariables systemVariables)
public void setCacheRegistry(CacheRegistry cacheRegistry)
public CacheRegistry getCacheRegistry()