public class CacheStatisticsImpl extends Object implements CacheStatisticsSPI
| Constructor and Description |
|---|
CacheStatisticsImpl() |
| Modifier and Type | Method and Description |
|---|---|
Set<String> |
classNames()
Returns the types that are known to this cache being tracked.
|
void |
disable()
Disable statistics collection.
|
void |
enable()
SPI implementation
|
long |
getHitCount()
Gets number of total read requests that has been found in cache since
last reset.
|
long |
getHitCount(Class<?> c)
Gets number of total read requests that has been found in cache for the given class since last reset.
|
long |
getHitCount(String str)
Gets number of total read requests that has been found in cache for the given class since last reset.
|
long |
getReadCount()
Gets number of total read requests since last reset.
|
long |
getReadCount(Class<?> c)
Gets number of total read requests for the given class since last reset.
|
long |
getReadCount(String str)
Gets number of total read requests for the given class since last reset.
|
long |
getTotalHitCount()
Gets number of total read requests that has been found in cache since
start.
|
long |
getTotalHitCount(Class<?> c)
Gets number of total read requests that has been found in cache for the given class since start.
|
long |
getTotalHitCount(String str)
Gets number of total read requests that has been found in cache for the given class since start.
|
long |
getTotalReadCount()
Gets number of total read requests since start.
|
long |
getTotalReadCount(Class<?> c)
Gets number of total read requests for the given class since start.
|
long |
getTotalReadCount(String str)
Gets number of total read requests for the given class since start.
|
long |
getTotalWriteCount()
Gets number of total write requests since start.
|
long |
getTotalWriteCount(Class<?> c)
Gets number of total write requests for the given class since start.
|
long |
getTotalWriteCount(String str)
Gets number of total write requests for the given class since start.
|
long |
getWriteCount()
Gets number of total write requests since last reset.
|
long |
getWriteCount(Class<?> c)
Gets number of total write requests for the given class since last reset.
|
long |
getWriteCount(String str)
Gets number of total write requests for the given class since last reset.
|
boolean |
isEnabled()
Returns whether or not statistics will be collected.
|
void |
newGet(Class<?> cls,
boolean hit)
Record a new cache get.
|
void |
newGet(Object oid,
boolean hit) |
void |
newPut(Class<?> cls)
Record a new cache put.
|
void |
newPut(Object oid) |
void |
reset()
Clears all accumulated statistics.
|
Date |
since()
Gets the time of last reset.
|
Date |
start()
Gets the time of start.
|
Map<String,long[]> |
toMap() |
public long getReadCount()
CacheStatisticsgetReadCount in interface CacheStatisticspublic long getHitCount()
CacheStatisticsgetHitCount in interface CacheStatisticspublic long getWriteCount()
CacheStatisticsgetWriteCount in interface CacheStatisticspublic long getTotalReadCount()
CacheStatisticsgetTotalReadCount in interface CacheStatisticspublic long getTotalHitCount()
CacheStatisticsgetTotalHitCount in interface CacheStatisticspublic long getTotalWriteCount()
CacheStatisticsgetTotalWriteCount in interface CacheStatisticspublic long getReadCount(Class<?> c)
CacheStatisticsgetReadCount in interface CacheStatisticspublic long getReadCount(String str)
CacheStatisticsgetReadCount in interface CacheStatisticspublic long getHitCount(Class<?> c)
CacheStatisticsgetHitCount in interface CacheStatisticspublic long getHitCount(String str)
CacheStatisticsgetHitCount in interface CacheStatisticspublic long getWriteCount(Class<?> c)
CacheStatisticsgetWriteCount in interface CacheStatisticspublic long getWriteCount(String str)
CacheStatisticsgetWriteCount in interface CacheStatisticspublic long getTotalReadCount(Class<?> c)
CacheStatisticsgetTotalReadCount in interface CacheStatisticspublic long getTotalReadCount(String str)
CacheStatisticsgetTotalReadCount in interface CacheStatisticspublic long getTotalHitCount(Class<?> c)
CacheStatisticsgetTotalHitCount in interface CacheStatisticspublic long getTotalHitCount(String str)
CacheStatisticsgetTotalHitCount in interface CacheStatisticspublic long getTotalWriteCount(Class<?> c)
CacheStatisticsgetTotalWriteCount in interface CacheStatisticspublic long getTotalWriteCount(String str)
CacheStatisticsgetTotalWriteCount in interface CacheStatisticspublic Date since()
CacheStatisticssince in interface CacheStatisticspublic Date start()
CacheStatisticsstart in interface CacheStatisticspublic void reset()
CacheStatisticsreset in interface CacheStatisticspublic boolean isEnabled()
CacheStatisticsisEnabled in interface CacheStatisticspublic Set<String> classNames()
CacheStatisticsclassNames in interface CacheStatisticspublic Map<String,long[]> toMap()
toMap in interface CacheStatisticspublic void enable()
enable in interface CacheStatisticsSPIpublic void disable()
CacheStatisticsSPIdisable in interface CacheStatisticsSPIpublic void newGet(Class<?> cls, boolean hit)
CacheStatisticsSPInewGet in interface CacheStatisticsSPIcls - - The class describing the type that is contained in the cache.hit - - true for a cache hit, false otherwisepublic void newGet(Object oid, boolean hit)
public void newPut(Class<?> cls)
CacheStatisticsSPInewPut in interface CacheStatisticsSPIcls - - The class describing the type that is contained in the cache.public void newPut(Object oid)
Copyright © 2006–2020 Apache Software Foundation. All rights reserved.