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()
CacheStatistics
getReadCount
in interface CacheStatistics
public long getHitCount()
CacheStatistics
getHitCount
in interface CacheStatistics
public long getWriteCount()
CacheStatistics
getWriteCount
in interface CacheStatistics
public long getTotalReadCount()
CacheStatistics
getTotalReadCount
in interface CacheStatistics
public long getTotalHitCount()
CacheStatistics
getTotalHitCount
in interface CacheStatistics
public long getTotalWriteCount()
CacheStatistics
getTotalWriteCount
in interface CacheStatistics
public long getReadCount(Class<?> c)
CacheStatistics
getReadCount
in interface CacheStatistics
public long getReadCount(String str)
CacheStatistics
getReadCount
in interface CacheStatistics
public long getHitCount(Class<?> c)
CacheStatistics
getHitCount
in interface CacheStatistics
public long getHitCount(String str)
CacheStatistics
getHitCount
in interface CacheStatistics
public long getWriteCount(Class<?> c)
CacheStatistics
getWriteCount
in interface CacheStatistics
public long getWriteCount(String str)
CacheStatistics
getWriteCount
in interface CacheStatistics
public long getTotalReadCount(Class<?> c)
CacheStatistics
getTotalReadCount
in interface CacheStatistics
public long getTotalReadCount(String str)
CacheStatistics
getTotalReadCount
in interface CacheStatistics
public long getTotalHitCount(Class<?> c)
CacheStatistics
getTotalHitCount
in interface CacheStatistics
public long getTotalHitCount(String str)
CacheStatistics
getTotalHitCount
in interface CacheStatistics
public long getTotalWriteCount(Class<?> c)
CacheStatistics
getTotalWriteCount
in interface CacheStatistics
public long getTotalWriteCount(String str)
CacheStatistics
getTotalWriteCount
in interface CacheStatistics
public Date since()
CacheStatistics
since
in interface CacheStatistics
public Date start()
CacheStatistics
start
in interface CacheStatistics
public void reset()
CacheStatistics
reset
in interface CacheStatistics
public boolean isEnabled()
CacheStatistics
isEnabled
in interface CacheStatistics
public Set<String> classNames()
CacheStatistics
classNames
in interface CacheStatistics
public Map<String,long[]> toMap()
toMap
in interface CacheStatistics
public void enable()
enable
in interface CacheStatisticsSPI
public void disable()
CacheStatisticsSPI
disable
in interface CacheStatisticsSPI
public void newGet(Class<?> cls, boolean hit)
CacheStatisticsSPI
newGet
in interface CacheStatisticsSPI
cls
- - 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)
CacheStatisticsSPI
newPut
in interface CacheStatisticsSPI
cls
- - 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.