|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This aspect handle caching of method results.
Method Summary | |
void |
cache(String classExpr,
String methodExpr)
Specifies that the result of some methods should be cache. |
void |
cacheWithTimeStamps(String classExpr,
String methodExpr,
String stampsName)
Specifies that the result of some methods should be cache. |
void |
setIgnoredParameters(AbstractMethodItem method,
int[] ignored)
Tells the cache aspect that some parameters of a method should be ignored for all cache operations. |
Method Detail |
public void cache(String classExpr, String methodExpr)
If cached method is called twice on the same object with the same parameters, (according to equals()), the method won't be called the second time, and the result of the first invocation will be returned.
classExpr
- which classes' method to cachemethodExpr
- which methods to cachecacheWithTimeStamps(String,String,String)
public void cacheWithTimeStamps(String classExpr, String methodExpr, String stampsName)
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.
classExpr
- which classes' method to cachemethodExpr
- which methods to cachestampsName
- name of the timestamp repository object to
use (e.g "timestamps#0")cache(String,String)
,
TimestampConf
public void setIgnoredParameters(AbstractMethodItem method, int[] ignored)
As far as the cache is concerned, they will be null.
method
- the method to configureignored
- the indexes of parameters to be ignored
(starting at 0)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |