Package org.apache.openjpa.datacache
Class CacheStatisticsImpl
java.lang.Object
org.apache.openjpa.datacache.CacheStatisticsImpl
- All Implemented Interfaces:
Serializable,CacheStatistics,CacheStatisticsSPI
The default CacheStatistics(SPI) implementation.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the types that are known to this cache being tracked.voiddisable()Disable statistics collection.voidenable()SPI implementationlongGets number of total read requests that has been found in cache since last reset.longgetHitCount(Class<?> c) Gets number of total read requests that has been found in cache for the given class since last reset.longgetHitCount(String str) Gets number of total read requests that has been found in cache for the given class since last reset.longGets number of total read requests since last reset.longgetReadCount(Class<?> c) Gets number of total read requests for the given class since last reset.longgetReadCount(String str) Gets number of total read requests for the given class since last reset.longGets number of total read requests that has been found in cache since start.longgetTotalHitCount(Class<?> c) Gets number of total read requests that has been found in cache for the given class since start.longgetTotalHitCount(String str) Gets number of total read requests that has been found in cache for the given class since start.longGets number of total read requests since start.longgetTotalReadCount(Class<?> c) Gets number of total read requests for the given class since start.longgetTotalReadCount(String str) Gets number of total read requests for the given class since start.longGets number of total write requests since start.longgetTotalWriteCount(Class<?> c) Gets number of total write requests for the given class since start.longgetTotalWriteCount(String str) Gets number of total write requests for the given class since start.longGets number of total write requests since last reset.longgetWriteCount(Class<?> c) Gets number of total write requests for the given class since last reset.longgetWriteCount(String str) Gets number of total write requests for the given class since last reset.booleanReturns whether or not statistics will be collected.voidRecord a new cache get.voidvoidRecord a new cache put.voidvoidreset()Clears all accumulated statistics.since()Gets the time of last reset.start()Gets the time of start.toMap()
-
Constructor Details
-
CacheStatisticsImpl
public CacheStatisticsImpl()
-
-
Method Details
-
getReadCount
public long getReadCount()Description copied from interface:CacheStatisticsGets number of total read requests since last reset.- Specified by:
getReadCountin interfaceCacheStatistics
-
getHitCount
public long getHitCount()Description copied from interface:CacheStatisticsGets number of total read requests that has been found in cache since last reset.- Specified by:
getHitCountin interfaceCacheStatistics
-
getWriteCount
public long getWriteCount()Description copied from interface:CacheStatisticsGets number of total write requests since last reset.- Specified by:
getWriteCountin interfaceCacheStatistics
-
getTotalReadCount
public long getTotalReadCount()Description copied from interface:CacheStatisticsGets number of total read requests since start.- Specified by:
getTotalReadCountin interfaceCacheStatistics
-
getTotalHitCount
public long getTotalHitCount()Description copied from interface:CacheStatisticsGets number of total read requests that has been found in cache since start.- Specified by:
getTotalHitCountin interfaceCacheStatistics
-
getTotalWriteCount
public long getTotalWriteCount()Description copied from interface:CacheStatisticsGets number of total write requests since start.- Specified by:
getTotalWriteCountin interfaceCacheStatistics
-
getReadCount
Description copied from interface:CacheStatisticsGets number of total read requests for the given class since last reset.- Specified by:
getReadCountin interfaceCacheStatistics
-
getReadCount
Description copied from interface:CacheStatisticsGets number of total read requests for the given class since last reset.- Specified by:
getReadCountin interfaceCacheStatistics
-
getHitCount
Description copied from interface:CacheStatisticsGets number of total read requests that has been found in cache for the given class since last reset.- Specified by:
getHitCountin interfaceCacheStatistics
-
getHitCount
Description copied from interface:CacheStatisticsGets number of total read requests that has been found in cache for the given class since last reset.- Specified by:
getHitCountin interfaceCacheStatistics
-
getWriteCount
Description copied from interface:CacheStatisticsGets number of total write requests for the given class since last reset.- Specified by:
getWriteCountin interfaceCacheStatistics
-
getWriteCount
Description copied from interface:CacheStatisticsGets number of total write requests for the given class since last reset.- Specified by:
getWriteCountin interfaceCacheStatistics
-
getTotalReadCount
Description copied from interface:CacheStatisticsGets number of total read requests for the given class since start.- Specified by:
getTotalReadCountin interfaceCacheStatistics
-
getTotalReadCount
Description copied from interface:CacheStatisticsGets number of total read requests for the given class since start.- Specified by:
getTotalReadCountin interfaceCacheStatistics
-
getTotalHitCount
Description copied from interface:CacheStatisticsGets number of total read requests that has been found in cache for the given class since start.- Specified by:
getTotalHitCountin interfaceCacheStatistics
-
getTotalHitCount
Description copied from interface:CacheStatisticsGets number of total read requests that has been found in cache for the given class since start.- Specified by:
getTotalHitCountin interfaceCacheStatistics
-
getTotalWriteCount
Description copied from interface:CacheStatisticsGets number of total write requests for the given class since start.- Specified by:
getTotalWriteCountin interfaceCacheStatistics
-
getTotalWriteCount
Description copied from interface:CacheStatisticsGets number of total write requests for the given class since start.- Specified by:
getTotalWriteCountin interfaceCacheStatistics
-
since
Description copied from interface:CacheStatisticsGets the time of last reset.- Specified by:
sincein interfaceCacheStatistics
-
start
Description copied from interface:CacheStatisticsGets the time of start.- Specified by:
startin interfaceCacheStatistics
-
reset
public void reset()Description copied from interface:CacheStatisticsClears all accumulated statistics.- Specified by:
resetin interfaceCacheStatistics
-
isEnabled
public boolean isEnabled()Description copied from interface:CacheStatisticsReturns whether or not statistics will be collected.- Specified by:
isEnabledin interfaceCacheStatistics
-
classNames
Description copied from interface:CacheStatisticsReturns the types that are known to this cache being tracked.- Specified by:
classNamesin interfaceCacheStatistics
-
toMap
- Specified by:
toMapin interfaceCacheStatistics
-
enable
public void enable()SPI implementation- Specified by:
enablein interfaceCacheStatisticsSPI
-
disable
public void disable()Description copied from interface:CacheStatisticsSPIDisable statistics collection.- Specified by:
disablein interfaceCacheStatisticsSPI
-
newGet
Description copied from interface:CacheStatisticsSPIRecord a new cache get.- Specified by:
newGetin interfaceCacheStatisticsSPI- Parameters:
cls- - The class describing the type that is contained in the cache.hit- - true for a cache hit, false otherwise
-
newGet
-
newPut
Description copied from interface:CacheStatisticsSPIRecord a new cache put.- Specified by:
newPutin interfaceCacheStatisticsSPI- Parameters:
cls- - The class describing the type that is contained in the cache.
-
newPut
-