public class ContextJCacheStatistics extends AbstractJCacheStatistics implements JCacheStatistics, ExternalizableLite, PortableObject
Constructor and Description |
---|
ContextJCacheStatistics()
Constructs ...
|
ContextJCacheStatistics(JCacheIdentifier id)
Constructs JCacheStatistics for cache
id |
Modifier and Type | Method and Description |
---|---|
JCacheStatistics |
add(JCacheStatistics stats)
add
JCacheStatistics stats to this instance. |
void |
clear() |
float |
getAverageGetTime() |
float |
getAveragePutTime() |
float |
getAverageRemoveTime() |
long |
getCacheEvictions() |
long |
getCacheGets() |
float |
getCacheHitPercentage() |
long |
getCacheHits() |
long |
getCacheHitsMillis()
get time elapsed in milliseconds performing operations resulting in a hit
|
long |
getCacheMisses() |
long |
getCacheMissesMillis()
get time elapsed in milliseconds performing operations resulting in a miss
|
float |
getCacheMissPercentage() |
long |
getCachePuts() |
long |
getCachePutsMillis()
get time elapsed in milliseconds performing operations resulting in a put
|
long |
getCacheRemovals() |
long |
getCacheRemoveMillis()
get time elapsed in milliseconds performing operations resulting in a remove
|
JCacheIdentifier |
getIdentifier()
Get unique JCacheIdentifier for cache that these statistics are for.
|
void |
readExternal(DataInput in)
Restore the contents of this object by loading the object's state from the passed DataInput object.
|
void |
readExternal(PofReader in)
Restore the contents of a user type instance by reading its state using the specified PofReader object.
|
void |
registerHits(int count, long lStartMillis)
add Cache Hits of count and compute time in cache hits
|
void |
registerHitsCompleted(long lStartMillis)
Record elapsed time in milliseconds performing hit(s)
|
void |
registerMisses(int count, long lStartMillis)
add Cache Misses of count and compute time in cache misses
|
void |
registerMissesCompleted(long lStartMillis)
Record elapsed time in milliseconds performing miss(es)
|
void |
registerPuts(long count, long lStartMillis)
add Cache Puts of count and compute time in cache puts
|
void |
registerPutsCompleted(long lStartMillis)
Record elapsed time performing puts
|
void |
registerRemove()
register a Cache Remove
|
void |
registerRemoveCompleted(long lStartMillis)
Record elapsed time in milliseconds performing removal(s)
|
void |
registerRemoves(long count, long lStartMillis)
add Cache Removals of count and compute time in cache removals
|
void |
writeExternal(DataOutput out)
Save the contents of this object by storing the object's state into the passed DataOutput object.
|
void |
writeExternal(PofWriter out)
Save the contents of a POF user type instance by writing its state using the specified PofWriter object.
|
toString
public ContextJCacheStatistics()
public ContextJCacheStatistics(JCacheIdentifier id)
id
id
- unique JCache cache identifierpublic void registerHits(int count, long lStartMillis)
JCacheStatistics
registerHits
in interface JCacheStatistics
count
- number of cache entry lookup hitslStartMillis
- start time in milliseconds for computing time performing lookup when there were hits.public void registerMisses(int count, long lStartMillis)
JCacheStatistics
registerMisses
in interface JCacheStatistics
count
- number of cache entry lookup misseslStartMillis
- start time of cache entry lookup that resulted in missespublic void registerPuts(long count, long lStartMillis)
JCacheStatistics
registerPuts
in interface JCacheStatistics
count
- number of cache entry putslStartMillis
- start time in milliseconds of put(s) operationpublic void registerPutsCompleted(long lStartMillis)
JCacheStatistics
registerPutsCompleted
in interface JCacheStatistics
lStartMillis
- start time in milliseconds of put(s) operationpublic void registerRemoves(long count, long lStartMillis)
JCacheStatistics
registerRemoves
in interface JCacheStatistics
count
- number of cache entry removalslStartMillis
- start time in milliseconds of removal(s) operationpublic void registerRemove()
JCacheStatistics
registerRemove
in interface JCacheStatistics
public void registerHitsCompleted(long lStartMillis)
JCacheStatistics
registerHitsCompleted
in interface JCacheStatistics
lStartMillis
- start time in milliseconds of operation that resulted in a hit(s)public void registerMissesCompleted(long lStartMillis)
JCacheStatistics
registerMissesCompleted
in interface JCacheStatistics
lStartMillis
- start time in milliseconds of operation that resulted in miss(es)public void registerRemoveCompleted(long lStartMillis)
JCacheStatistics
registerRemoveCompleted
in interface JCacheStatistics
lStartMillis
- start time in milliseconds of operation that resulted in removal(s)public JCacheIdentifier getIdentifier()
JCacheStatistics
getIdentifier
in interface JCacheStatistics
public JCacheStatistics add(JCacheStatistics stats)
JCacheStatistics
JCacheStatistics
stats to this instance.add
in interface JCacheStatistics
stats
- from another data-enabled serverpublic long getCacheHitsMillis()
JCacheStatistics
getCacheHitsMillis
in interface JCacheStatistics
public long getCacheMissesMillis()
JCacheStatistics
getCacheMissesMillis
in interface JCacheStatistics
public long getCachePutsMillis()
JCacheStatistics
getCachePutsMillis
in interface JCacheStatistics
public long getCacheRemoveMillis()
JCacheStatistics
getCacheRemoveMillis
in interface JCacheStatistics
public void clear()
clear
in interface JCacheStatistics
clear
in interface javax.cache.management.CacheStatisticsMXBean
public long getCacheHits()
getCacheHits
in interface JCacheStatistics
getCacheHits
in interface javax.cache.management.CacheStatisticsMXBean
public float getCacheHitPercentage()
getCacheHitPercentage
in interface JCacheStatistics
getCacheHitPercentage
in interface javax.cache.management.CacheStatisticsMXBean
public long getCacheMisses()
getCacheMisses
in interface JCacheStatistics
getCacheMisses
in interface javax.cache.management.CacheStatisticsMXBean
public float getCacheMissPercentage()
getCacheMissPercentage
in interface JCacheStatistics
getCacheMissPercentage
in interface javax.cache.management.CacheStatisticsMXBean
public long getCacheGets()
getCacheGets
in interface JCacheStatistics
getCacheGets
in interface javax.cache.management.CacheStatisticsMXBean
public long getCachePuts()
getCachePuts
in interface JCacheStatistics
getCachePuts
in interface javax.cache.management.CacheStatisticsMXBean
public long getCacheRemovals()
getCacheRemovals
in interface JCacheStatistics
getCacheRemovals
in interface javax.cache.management.CacheStatisticsMXBean
public long getCacheEvictions()
getCacheEvictions
in interface JCacheStatistics
getCacheEvictions
in interface javax.cache.management.CacheStatisticsMXBean
public float getAverageGetTime()
getAverageGetTime
in interface JCacheStatistics
getAverageGetTime
in interface javax.cache.management.CacheStatisticsMXBean
public float getAveragePutTime()
getAveragePutTime
in interface JCacheStatistics
getAveragePutTime
in interface javax.cache.management.CacheStatisticsMXBean
public float getAverageRemoveTime()
getAverageRemoveTime
in interface JCacheStatistics
getAverageRemoveTime
in interface javax.cache.management.CacheStatisticsMXBean
public void readExternal(PofReader in) throws IOException
PortableObject
readExternal
in interface PortableObject
in
- the PofReader from which to read the object's stateIOException
- if an I/O error occurspublic void writeExternal(PofWriter out) throws IOException
PortableObject
writeExternal
in interface PortableObject
out
- the PofWriter to which to write the object's stateIOException
- if an I/O error occurspublic void readExternal(DataInput in) throws IOException
ExternalizableLite
readExternal
in interface ExternalizableLite
in
- the DataInput stream to read data from in order to restore the state of this objectIOException
- if an I/O exception occursNotActiveException
- if the object is not in its initial state, and therefore cannot be deserialized intopublic void writeExternal(DataOutput out) throws IOException
ExternalizableLite
writeExternal
in interface ExternalizableLite
out
- the DataOutput stream to write the state of this object toIOException
- if an I/O exception occurs