|
DODS 6.5 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.enhydra.dods.cache.hash.LinkedHashCache
org.enhydra.dods.cache.hash.DODSLinkedHashCache
DODSLinkedHashCache class implements LRU cache (for storing data objects (or DataStruct objects), or simple queries, or complex queries), and provides query statistics about the cache (query number, cache hits number, their get/set/increment methods, percents of used cache, cache hits,...).
Nested Class Summary |
Nested classes inherited from class java.util.Map |
java.util.Map.Entry |
Field Summary | |
protected int |
cacheAccessNum
Total number of times the cache was accessed. |
protected int |
cacheHitsNum
Number of queries performed on the cache successfully. |
Fields inherited from class org.enhydra.dods.cache.hash.LinkedHashCache |
maxEntries |
Method Summary | |
void |
clearStatistics()
Clears statistics. |
int |
getCacheAccessNum()
Returns total number of times the cache was accessed. |
int |
getCacheHitsNum()
Returns number of queries performed on the cache successfully. |
double |
getCacheHitsPercents()
Returns how much queries performed on the cache were successful. |
double |
getUsedPercents()
Returns how much cache is currently used. |
void |
incrementCacheAccessNum(int num)
Increases total number of times the cache was accessed. |
void |
incrementCacheHitsNum(int num)
Increases number of queries performed on the cache successfully for one. |
boolean |
isNeedToSynchronize()
|
void |
setCacheAccessNum(int num)
Sets total number of times the cache was accessed. |
void |
setCacheHitsNum(int cacheHitsNum)
Sets number of queries performed on the cache successfully. |
Methods inherited from class org.enhydra.dods.cache.hash.LinkedHashCache |
add, clear, containsKey, containsValue, entrySet, equals, get, getMaxEntries, hashCode, isEmpty, keySet, put, putAll, remove, setMaxEntries, size, toString, values |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.enhydra.dods.cache.base.DODSCache |
add, getMaxEntries, setMaxEntries |
Methods inherited from interface java.util.Map |
clear, containsKey, containsValue, entrySet, equals, get, hashCode, isEmpty, keySet, put, putAll, remove, size, values |
Field Detail |
protected int cacheAccessNum
protected int cacheHitsNum
Method Detail |
public int getCacheAccessNum()
getCacheAccessNum
in interface CacheStatistics
public void setCacheAccessNum(int num)
setCacheAccessNum
in interface CacheStatistics
num
- Total number of times the cache was accessed.public void incrementCacheAccessNum(int num)
incrementCacheAccessNum
in interface CacheStatistics
public int getCacheHitsNum()
getCacheHitsNum
in interface CacheStatistics
public void setCacheHitsNum(int cacheHitsNum)
setCacheHitsNum
in interface CacheStatistics
cacheHitsNum
- Number of queries performed on the cache successfully.public void incrementCacheHitsNum(int num)
incrementCacheHitsNum
in interface CacheStatistics
public double getUsedPercents()
getUsedPercents
in interface CacheStatistics
public double getCacheHitsPercents()
getCacheHitsPercents
in interface CacheStatistics
public void clearStatistics()
clearStatistics
in interface CacheStatistics
public boolean isNeedToSynchronize()
isNeedToSynchronize
in interface DODSCache
|
DODS 6.5 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |