public class Cache extends Object
| Modifier and Type | Field and Description |
|---|---|
protected Map |
cache |
protected long |
cacheUsed |
protected long |
totalCall |
| Constructor and Description |
|---|
Cache() |
| Modifier and Type | Method and Description |
|---|---|
Object |
call(org.codehaus.aspectwerkz.joinpoint.JoinPoint jp) |
protected Object |
computeKey(org.codehaus.aspectwerkz.joinpoint.JoinPoint jp)
Attention pour avoir une chaine en sortie on prend la reprensentation
toString des arguments.
|
static long |
getCacheUsed() |
static long |
getTotalCall() |
protected Trace |
getTrace()
Return trace object from context.
|
static String |
printStatistiqueAndClear()
Affiche les statistiques
|
protected Object |
realCall(org.codehaus.aspectwerkz.joinpoint.JoinPoint jp)
On fait l'appel reel dans une autre methode pour pouvoir le savoir
dans les traces
|
protected long totalCall
protected long cacheUsed
protected Map cache
protected Trace getTrace()
public Object call(org.codehaus.aspectwerkz.joinpoint.JoinPoint jp) throws Throwable
Throwableprotected Object realCall(org.codehaus.aspectwerkz.joinpoint.JoinPoint jp) throws Throwable
jp - Throwableprotected Object computeKey(org.codehaus.aspectwerkz.joinpoint.JoinPoint jp)
Pour les objets de style Number ou String, il faut prendre le vrai toString, pour que 2 soit bien egal a 2.
jp - public static long getCacheUsed()
public static long getTotalCall()
public static String printStatistiqueAndClear()
Copyright © 1999-2012 CodeLutin. All Rights Reserved.