Interface JCacheStatistics
- All Superinterfaces:
javax.cache.management.CacheStatisticsMXBean
- All Known Implementing Classes:
AbstractJCacheStatistics
,ContextJCacheStatistics
,PartitionedJCacheStatistics
public interface JCacheStatistics
extends javax.cache.management.CacheStatisticsMXBean
Interface for JCache Statistics.
JCache cache statistics differed enough from current Coherence cache statistics that
just ended up maintaining statistics separately.
Examples of differences include put of same value is optimized in Coherence implementation
but JCache considers them 2 distinct puts. (could not pass jsr 107 tck with that behavior)
Additionally, coherence does not count removals at the time this was written.
- Since:
- Coherence 12.1.3
- Author:
- jf 2014.1.29
-
Method Summary
Modifier and TypeMethodDescriptionadd
(JCacheStatistics stats) addJCacheStatistics
stats to this instance.void
clear()
float
float
float
long
long
float
long
long
get time elapsed in milliseconds performing operations resulting in a hitlong
long
get time elapsed in milliseconds performing operations resulting in a missfloat
long
long
get time elapsed in milliseconds performing operations resulting in a putlong
long
get time elapsed in milliseconds performing operations resulting in a removeGet unique JCacheIdentifier for cache that these statistics are for.void
registerHits
(int count, long lStartMillis) add Cache Hits of count and compute time in cache hitsvoid
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 missesvoid
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 putsvoid
registerPutsCompleted
(long lStartMillis) Record elapsed time performing putsvoid
register a Cache Removevoid
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
-
Method Details
-
registerHits
void registerHits(int count, long lStartMillis) add Cache Hits of count and compute time in cache hits- Parameters:
count
- number of cache entry lookup hitslStartMillis
- start time in milliseconds for computing time performing lookup when there were hits.
-
registerMisses
void registerMisses(int count, long lStartMillis) add Cache Misses of count and compute time in cache misses- Parameters:
count
- number of cache entry lookup misseslStartMillis
- start time of cache entry lookup that resulted in misses
-
registerPuts
void registerPuts(long count, long lStartMillis) add Cache Puts of count and compute time in cache puts- Parameters:
count
- number of cache entry putslStartMillis
- start time in milliseconds of put(s) operation
-
registerPutsCompleted
void registerPutsCompleted(long lStartMillis) Record elapsed time performing puts- Parameters:
lStartMillis
- start time in milliseconds of put(s) operation
-
registerRemoves
void registerRemoves(long count, long lStartMillis) add Cache Removals of count and compute time in cache removals- Parameters:
count
- number of cache entry removalslStartMillis
- start time in milliseconds of removal(s) operation
-
registerRemove
void registerRemove()register a Cache Remove -
registerHitsCompleted
void registerHitsCompleted(long lStartMillis) Record elapsed time in milliseconds performing hit(s)- Parameters:
lStartMillis
- start time in milliseconds of operation that resulted in a hit(s)
-
registerMissesCompleted
void registerMissesCompleted(long lStartMillis) Record elapsed time in milliseconds performing miss(es)- Parameters:
lStartMillis
- start time in milliseconds of operation that resulted in miss(es)
-
registerRemoveCompleted
void registerRemoveCompleted(long lStartMillis) Record elapsed time in milliseconds performing removal(s)- Parameters:
lStartMillis
- start time in milliseconds of operation that resulted in removal(s)
-
getIdentifier
JCacheIdentifier getIdentifier()Get unique JCacheIdentifier for cache that these statistics are for.- Returns:
- unique JCacheIdentifier
-
add
addJCacheStatistics
stats to this instance.- Parameters:
stats
-JCacheStatistics
from another data-enabled server- Returns:
- the addition of stats to this instance
-
getCacheHitsMillis
long getCacheHitsMillis()get time elapsed in milliseconds performing operations resulting in a hit- Returns:
- duration of operations that resulted in cache entry hit
-
getCacheMissesMillis
long getCacheMissesMillis()get time elapsed in milliseconds performing operations resulting in a miss- Returns:
- duration of operations that resulted in cache entry miss
-
getCachePutsMillis
long getCachePutsMillis()get time elapsed in milliseconds performing operations resulting in a put- Returns:
- duration of operations that resulted in cache entry put
-
getCacheRemoveMillis
long getCacheRemoveMillis()get time elapsed in milliseconds performing operations resulting in a remove- Returns:
- duration of operations that resulted in cache entry remove
-
clear
void clear()- Specified by:
clear
in interfacejavax.cache.management.CacheStatisticsMXBean
-
getCacheHits
long getCacheHits()- Specified by:
getCacheHits
in interfacejavax.cache.management.CacheStatisticsMXBean
-
getCacheHitPercentage
float getCacheHitPercentage()- Specified by:
getCacheHitPercentage
in interfacejavax.cache.management.CacheStatisticsMXBean
-
getCacheMisses
long getCacheMisses()- Specified by:
getCacheMisses
in interfacejavax.cache.management.CacheStatisticsMXBean
-
getCacheMissPercentage
float getCacheMissPercentage()- Specified by:
getCacheMissPercentage
in interfacejavax.cache.management.CacheStatisticsMXBean
-
getCacheGets
long getCacheGets()- Specified by:
getCacheGets
in interfacejavax.cache.management.CacheStatisticsMXBean
-
getCachePuts
long getCachePuts()- Specified by:
getCachePuts
in interfacejavax.cache.management.CacheStatisticsMXBean
-
getCacheRemovals
long getCacheRemovals()- Specified by:
getCacheRemovals
in interfacejavax.cache.management.CacheStatisticsMXBean
-
getCacheEvictions
long getCacheEvictions()- Specified by:
getCacheEvictions
in interfacejavax.cache.management.CacheStatisticsMXBean
-
getAverageGetTime
float getAverageGetTime()- Specified by:
getAverageGetTime
in interfacejavax.cache.management.CacheStatisticsMXBean
-
getAveragePutTime
float getAveragePutTime()- Specified by:
getAveragePutTime
in interfacejavax.cache.management.CacheStatisticsMXBean
-
getAverageRemoveTime
float getAverageRemoveTime()- Specified by:
getAverageRemoveTime
in interfacejavax.cache.management.CacheStatisticsMXBean
-