|
CoherenceTM v3.3 Copyright© 2000-2007 by Oracle Corporation |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.tangosol.util.Base
com.tangosol.net.cache.SimpleCacheStatistics
public class SimpleCacheStatistics
Implementation of the CacheStatistics class intended for use by a cache to maintain its statistics.
Field Summary | |
---|---|
protected long |
m_cCacheHits
The rough (ie unsynchronized) number of calls that could be answered from the front or the back and were answered by data in the front map. |
protected long |
m_cCacheMisses
The rough (ie unsynchronized) number of calls that could be answered from the front or the back and were answered by data in the back map. |
protected long |
m_cCachePuts
Total number of put operations since the last statistics reset. |
protected long |
m_cHitsMillis
Total number of milliseconds used for get operations that were hits since the last statistics reset. |
protected long |
m_cMissesMillis
Total number of milliseconds used for get operations that were misses since the last statistics reset. |
protected long |
m_cPutsMillis
Total number of milliseconds used for put operations since the last statistics reset. |
Constructor Summary | |
---|---|
SimpleCacheStatistics()
Default constructor. |
Method Summary | |
---|---|
double |
getAverageGetMillis()
Determine the average number of milliseconds per get() invocation since the cache statistics were last reset. |
double |
getAverageHitMillis()
Determine the average number of milliseconds per get() invocation that is a hit (answered using only the front map). |
double |
getAverageMissMillis()
Determine the average number of milliseconds per get() invocation that is a miss (uses the back map). |
double |
getAveragePutMillis()
Determine the average number of milliseconds per put() invocation since the cache statistics were last reset. |
long |
getCacheHits()
Determine the rough number of cache hits since the cache statistics were last reset. |
long |
getCacheHitsMillis()
Determine the total number of milliseconds (since that last statistics reset) for the get() operations for which an entry existed in this map. |
long |
getCacheMisses()
Determine the rough number of cache misses since the cache statistics were last reset. |
long |
getCacheMissesMillis()
Determine the total number of milliseconds (since that last statistics reset) for the get() operations for which no entry existed in this map. |
double |
getHitProbability()
Determine the rough probability (0 <= p <= 1) that any particular invocation that could be answered using the front or the back will be handled by the front map, based on the statistics collected since the last reset of the cache statistics. |
long |
getTotalGets()
Determine the total number of get() operations since the cache statistics were last reset. |
long |
getTotalGetsMillis()
Determine the total number of milliseconds spent on get() operations since the cache statistics were last reset. |
long |
getTotalPuts()
Determine the total number of put() operations since the cache statistics were last reset. |
long |
getTotalPutsMillis()
Determine the total number of milliseconds spent on put() operations since the cache statistics were last reset. |
void |
registerHit()
Register a cache hit (no timing information). |
void |
registerHit(long lStartMillis)
Register a cache hit. |
void |
registerHits(int cHits,
long lStartMillis)
Register a multiple cache hit. |
void |
registerMiss()
Register a cache miss (no timing information). |
void |
registerMiss(long lStartMillis)
Register a cache miss. |
void |
registerMisses(int cMisses,
long lStartMillis)
Register a multiple cache miss. |
void |
registerPut(long lStartMillis)
Register a cache put. |
void |
registerPuts(int cPuts,
long lStartMillis)
Register a multiple cache put. |
void |
resetHitStatistics()
Reset the cache statistics. |
String |
toString()
For debugging purposes, format the contents of the SimpleCachingStatistics in a human readable format. |
Field Detail |
---|
protected volatile long m_cCacheHits
protected volatile long m_cCacheMisses
protected volatile long m_cHitsMillis
protected volatile long m_cMissesMillis
protected volatile long m_cCachePuts
protected volatile long m_cPutsMillis
Constructor Detail |
---|
public SimpleCacheStatistics()
Method Detail |
---|
public long getTotalGets()
getTotalGets
in interface CacheStatistics
public long getTotalGetsMillis()
getTotalGetsMillis
in interface CacheStatistics
public double getAverageGetMillis()
getAverageGetMillis
in interface CacheStatistics
public long getTotalPuts()
getTotalPuts
in interface CacheStatistics
public long getTotalPutsMillis()
getTotalPutsMillis
in interface CacheStatistics
public double getAveragePutMillis()
getAveragePutMillis
in interface CacheStatistics
public long getCacheHits()
getCacheHits
in interface CacheStatistics
public long getCacheHitsMillis()
CacheStatistics
getCacheHitsMillis
in interface CacheStatistics
public double getAverageHitMillis()
getAverageHitMillis
in interface CacheStatistics
public long getCacheMisses()
getCacheMisses
in interface CacheStatistics
public long getCacheMissesMillis()
CacheStatistics
getCacheMissesMillis
in interface CacheStatistics
public double getAverageMissMillis()
getAverageMissMillis
in interface CacheStatistics
public double getHitProbability()
getHitProbability
in interface CacheStatistics
public void resetHitStatistics()
resetHitStatistics
in interface CacheStatistics
public String toString()
public void registerHit()
public void registerHit(long lStartMillis)
lStartMillis
- the time when the get operation startedpublic void registerHits(int cHits, long lStartMillis)
cHits
- the number of hitslStartMillis
- the time when the get operation startedpublic void registerMiss()
public void registerMiss(long lStartMillis)
lStartMillis
- the time when the get operation startedpublic void registerMisses(int cMisses, long lStartMillis)
cMisses
- the number of misseslStartMillis
- the time when the get operation startedpublic void registerPut(long lStartMillis)
lStartMillis
- the time when the put operation startedpublic void registerPuts(int cPuts, long lStartMillis)
cPuts
- the number of putslStartMillis
- the time when the put operation started
|
CoherenceTM v3.3 Copyright© 2000-2007 by Oracle Corporation |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |