fr.ifremer.isisfish.aspect
Class Cache

java.lang.Object
  extended by fr.ifremer.isisfish.aspect.Cache

public class Cache
extends java.lang.Object

Cache aspect. Created: 25 août 06 22:42:47

Version:
$Revision: 2600 $ Last update: $Date: 2009-09-11 12:16:31 +0200 (ven., 11 sept. 2009) $ by : $Author: chatellier $
Author:
poussin

Field Summary
protected  java.util.Map cache
           
protected  long cacheUsed
           
protected  long totalCall
           
 
Constructor Summary
Cache()
           
 
Method Summary
 java.lang.Object call(org.codehaus.aspectwerkz.joinpoint.JoinPoint jp)
           
protected  java.lang.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 java.lang.String printStatistiqueAndClear()
          Affiche les statistiques
protected  java.lang.Object realCall(org.codehaus.aspectwerkz.joinpoint.JoinPoint jp)
          On fait l'appel reel dans une autre methode pour pouvoir le savoir dans les traces
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

totalCall

protected long totalCall

cacheUsed

protected long cacheUsed

cache

protected java.util.Map cache
Constructor Detail

Cache

public Cache()
Method Detail

getTrace

protected Trace getTrace()
Return trace object from context.

Returns:
trace object from context

call

public java.lang.Object call(org.codehaus.aspectwerkz.joinpoint.JoinPoint jp)
                      throws java.lang.Throwable
Throws:
java.lang.Throwable

realCall

protected java.lang.Object realCall(org.codehaus.aspectwerkz.joinpoint.JoinPoint jp)
                             throws java.lang.Throwable
On fait l'appel reel dans une autre methode pour pouvoir le savoir dans les traces

Parameters:
jp -
Returns:
?
Throws:
java.lang.Throwable

computeKey

protected java.lang.Object computeKey(org.codehaus.aspectwerkz.joinpoint.JoinPoint jp)
Attention pour avoir une chaine en sortie on prend la reprensentation toString des arguments. Mais en utilisant la methode toString implanté dans Object.

Pour les objets de style Number ou String, il faut prendre le vrai toString, pour que 2 soit bien egal a 2.

Parameters:
jp -
Returns:
?

getCacheUsed

public static long getCacheUsed()
Returns:
Returns the cacheUsed.

getTotalCall

public static long getTotalCall()
Returns:
Returns the totalCall.

printStatistiqueAndClear

public static java.lang.String printStatistiqueAndClear()
Affiche les statistiques



Copyright © 1999-2010 CodeLutin. All Rights Reserved.