public class CouchbaseStatisticsMxBean extends Object implements javax.cache.management.CacheStatisticsMXBean, Serializable
Couchbase Cache statistics.
Statistics are accumulated from the time a cache is created. They can be reset to zero using clear()
.
There are no defined consistency semantics for statistics. Refer to the implementation for precise semantics.
Each cache’s statistics object must be registered with an ObjectName that is unique and has the following type and attributes:
Type: javax.cache:type=CacheStatistics
Required Attributes:
CacheStatisticsMXBean
,
Serialized FormConstructor and Description |
---|
CouchbaseStatisticsMxBean(CouchbaseCache<?,?> cache)
Constructs a cache statistics object.
|
Modifier and Type | Method and Description |
---|---|
void |
addGetTimeNano(long duration)
Increment the get time accumulator.
|
void |
addPutTimeNano(long duration)
Increment the put time accumulator.
|
void |
addRemoveTimeNano(long duration)
Increment the remove time accumulator.
|
void |
clear()
Statistics will also automatically be cleared if internal counters overflow.
|
float |
getAverageGetTime() |
float |
getAveragePutTime() |
float |
getAverageRemoveTime() |
long |
getCacheEvictions() |
long |
getCacheGets() |
float |
getCacheHitPercentage() |
long |
getCacheHits() |
long |
getCacheMisses() |
float |
getCacheMissPercentage() |
long |
getCachePuts() |
long |
getCacheRemovals() |
void |
increaseCacheEvictions(long number)
Increase the cache evictions by the number specified.
|
void |
increaseCacheExpiries(long number)
Increase the expiries by the number specified.
|
void |
increaseCacheHits(long number)
Increase the cache hits by the number specified.
|
void |
increaseCacheMisses(long number)
Increase the cache misses by the number specified.
|
void |
increaseCachePuts(long number)
Increase the cache puts by the number specified.
|
void |
increaseCacheRemovals(long number)
Increase the cache removals by the number specified.
|
public CouchbaseStatisticsMxBean(CouchbaseCache<?,?> cache)
Constructs a cache statistics object.
cache
- the associated cachepublic void clear()
Statistics will also automatically be cleared if internal counters overflow.
clear
in interface javax.cache.management.CacheStatisticsMXBean
public long getCacheHits()
getCacheHits
in interface javax.cache.management.CacheStatisticsMXBean
public float getCacheHitPercentage()
getCacheHitPercentage
in interface javax.cache.management.CacheStatisticsMXBean
public long getCacheMisses()
getCacheMisses
in interface javax.cache.management.CacheStatisticsMXBean
public float getCacheMissPercentage()
getCacheMissPercentage
in interface javax.cache.management.CacheStatisticsMXBean
public long getCacheGets()
getCacheGets
in interface javax.cache.management.CacheStatisticsMXBean
public long getCachePuts()
getCachePuts
in interface javax.cache.management.CacheStatisticsMXBean
public long getCacheRemovals()
getCacheRemovals
in interface javax.cache.management.CacheStatisticsMXBean
public long getCacheEvictions()
getCacheEvictions
in interface javax.cache.management.CacheStatisticsMXBean
public float getAverageGetTime()
getAverageGetTime
in interface javax.cache.management.CacheStatisticsMXBean
public float getAveragePutTime()
getAveragePutTime
in interface javax.cache.management.CacheStatisticsMXBean
public float getAverageRemoveTime()
getAverageRemoveTime
in interface javax.cache.management.CacheStatisticsMXBean
public void increaseCacheRemovals(long number)
Increase the cache removals by the number specified.
number
- the number to increase the counter bypublic void increaseCacheExpiries(long number)
Increase the expiries by the number specified.
number
- the number to increase the counter bypublic void increaseCachePuts(long number)
Increase the cache puts by the number specified.
number
- the number to increase the counter bypublic void increaseCacheHits(long number)
Increase the cache hits by the number specified.
number
- the number to increase the counter bypublic void increaseCacheMisses(long number)
Increase the cache misses by the number specified.
number
- the number to increase the counter bypublic void increaseCacheEvictions(long number)
Increase the cache evictions by the number specified.
number
- the number to increase the counter bypublic void addGetTimeNano(long duration)
Increment the get time accumulator.
duration
- the time taken in nanosecondspublic void addPutTimeNano(long duration)
Increment the put time accumulator.
duration
- the time taken in nanosecondspublic void addRemoveTimeNano(long duration)
Increment the remove time accumulator.
duration
- the time taken in nanosecondsCopyright © 2014 Couchbase, Inc.