public class IsisCache extends Object
Created: 25 août 06 22:42:47
Last update: $Date$ by : $Author$
Modifier and Type | Field and Description |
---|---|
protected IsisCacheBackend |
cacheBackend |
protected long |
cacheUsed |
static IsisCacheBackend.Factory |
defaultFactory |
protected Map<Method,String> |
methodStringCache
La representation de la methode en string, la representation commence
par un @ si il y a l'annotation noCache trouver pour cette methode.
|
protected StringBuilder |
sbKey |
protected long |
totalCall |
Constructor and Description |
---|
IsisCache() |
IsisCache(IsisCacheBackend cacheBackend) |
Modifier and Type | Method and Description |
---|---|
void |
clear()
remove all values in cache
|
void |
clear(TimeStep step)
remove all values in cache for the specied TimeStep
|
protected TimeStep |
computeKey(StringBuilder sbKey,
String methodString,
Object[] args) |
Object |
get(Method method,
Object[] args,
Object defaultValue)
Recupere pour un pas de temps donnes une valeur calcule pour une cle.
|
protected Object |
get(TimeStep step,
String key) |
long |
getCacheUsed() |
long |
getTotalCall() |
String |
printStatistiqueAndClear()
Affiche les statistiques
|
protected void |
put(TimeStep step,
String key,
Object value) |
protected Object |
realCall(Object defaultValue)
On fait l'appel reel dans une autre methode pour pouvoir le savoir dans
les traces.
|
public static IsisCacheBackend.Factory defaultFactory
protected long totalCall
protected long cacheUsed
protected IsisCacheBackend cacheBackend
protected Map<Method,String> methodStringCache
protected StringBuilder sbKey
public IsisCache()
public IsisCache(IsisCacheBackend cacheBackend)
public Object get(Method method, Object[] args, Object defaultValue) throws Throwable
defaultValue
- la valeur par defaut a retourner si elle n'est pas en
cache si defaultValue est une JoinPoint alors un
proceed est appele dessus et le resultat de l'appel
est utiliser comme valeur par defautThrowable
protected TimeStep computeKey(StringBuilder sbKey, String methodString, Object[] args)
protected Object realCall(Object defaultValue) throws Throwable
Throwable
public void clear()
public void clear(TimeStep step)
public long getCacheUsed()
public long getTotalCall()
public String printStatistiqueAndClear()
Copyright © 1999–2020 CodeLutin. All rights reserved.