org.objectweb.jac.aspects.cache
Class CacheAC
java.lang.Object
|
+--org.objectweb.jac.core.AspectComponent
|
+--org.objectweb.jac.aspects.cache.CacheAC
- All Implemented Interfaces:
- BaseProgramListener, CacheConf, Serializable
- public class CacheAC
- extends AspectComponent
- implements CacheConf
This aspect handle caching of method results.
- See Also:
- Serialized Form
| Fields inherited from class org.objectweb.jac.core.AspectComponent |
application, blockKeywords, cr, currentConfigMethod, currentImports, firstCall, NOT_SHARED, SHARED, startWeavingCCount, startWeavingCount, startWeavingMethod, startWeavingType, systemListener, wrappers |
| Methods inherited from class org.objectweb.jac.core.AspectComponent |
addWrapper, afterApplicationStarted, afterRunningWrapper, afterWrap, afterWrappeeInit, attr, attrdef, beforeConfiguration, beforeReload, beforeRunningWrapper, beforeWrappeeInit, configure, defines, defineTimer, doRegister, doUnregister, error, getAC, getApplication, getBlockKeywords, getConfigurationMethods, getConfigurationMethodsName, getConfigurationMethodsName, getDefaultConfigs, getName, getNameCounters, getWrappers, init, isConfigurationMethod, isSystemListener, onExit, pointcut, pointcut, pointcut, pointcut, pointcut, pointcut, pointcut, pointcut, setApplication, setAttribute, setAttribute, setAttribute, setSystemListener, simulateUsingNewInstance, unweave, unwrapAll, updateNameCounters, warning, weave, whenClone, whenCloseDisplay, whenConfigured, whenDeleted, whenDeserialized, whenFree, whenGetObjects, whenNameObject, whenObjectMiss, whenReload, whenRemoteInstantiation, whenSerialized, whenTopologyChanged, whenUsingNewClass, whenUsingNewInstance |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
IGNORED_PARAMETERS
public static final String IGNORED_PARAMETERS
- See Also:
- Constant Field Values
CacheAC
public CacheAC()
cache
public void cache(String classExpr,
String methodExpr)
- Cache a method result.
- Specified by:
cache in interface CacheConf
- Parameters:
classExpr - the classesmethodExpr - the methods cached- See Also:
CacheConf.cacheWithTimeStamps(String,String,String)
cacheWithTimeStamps
public void cacheWithTimeStamps(String classExpr,
String methodExpr,
String stampsName)
- Description copied from interface:
CacheConf
- Specifies that the result of some methods should be cache.
Same as cache(), but the cache is invalidated
if one of the parameters changed (according to the timestamp
aspect) since the cached value was stored.
- Specified by:
cacheWithTimeStamps in interface CacheConf
- Parameters:
classExpr - which classes' method to cachemethodExpr - which methods to cachestampsName - name of the timestamp repository object to
use (e.g "timestamps#0")- See Also:
CacheConf.cache(String,String),
TimestampConf
setIgnoredParameters
public void setIgnoredParameters(AbstractMethodItem method,
int[] ignored)
- Description copied from interface:
CacheConf
- Tells the cache aspect that some parameters of a method should
be ignored for all cache operations.
As far as the cache is concerned, they will be null.
- Specified by:
setIgnoredParameters in interface CacheConf
- Parameters:
method - the method to configureignored - the indexes of parameters to be ignored
(starting at 0)
invalidateCache
public void invalidateCache()