|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ls.util.cache.CacheStatistic
Statistic class that can be used by any cacher class. In this class the following information are followed.
- The number of data that retrieved from the cache successfully
- The number of data that were invalid when user wanted to access
- The number of data that were not exist in the hash when user requested
- The number of data that were removed by garbage collector when user requested
Constructor Summary | |
CacheStatistic()
Constructor, that initialize the internal variables |
|
CacheStatistic(int newFromCache,
int newInvalidData,
int newNoData,
int newRemovedFromMemory)
Constructor, that initialize the variables |
Method Summary | |
StringBuffer |
getStatistics()
Returns the statistics of this cache |
void |
incFromCache()
Increases number of data that retrieved from cache successfully |
void |
incInvalidData()
Increases number of data that are invalid when user wants to access |
void |
incNoData()
Increases the number of data that were not exist in the hash when user requested |
void |
incRemovedFromMemory()
Increases the number of data that were removed by garbage collector when user requested |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public CacheStatistic()
public CacheStatistic(int newFromCache, int newInvalidData, int newNoData, int newRemovedFromMemory)
newFromCache
- initial value for fromCache variablenewInvalidData
- initial value for invalidData variablenewNoData
- initial value for noData variablenewRemovedFromMemory
- initial value for removedFromMemory variableMethod Detail |
public void incFromCache()
public void incInvalidData()
public void incNoData()
public void incRemovedFromMemory()
public StringBuffer getStatistics()
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |