Package org.apache.openjpa.datacache
Interface CacheStatistics
- All Superinterfaces:
Serializable
- All Known Subinterfaces:
CacheStatisticsSPI
- All Known Implementing Classes:
CacheStatisticsImpl
Counts number of read/write requests and hit ratio for a cache in total and
per-class basis.
All methods with Class as input argument treats null as
java.lang.Object. All per-class statistics depends on
determining the runtime type of the instance being cached. If it is not
possible to determine the runtime type from the given context, the statistics
is registered under generic java.lang.Object.- Since:
- 1.3.0
-
Method Summary
Modifier and TypeMethodDescriptionReturns the types that are known to this cache being tracked.longGets number of total read requests that has been found in cache since last reset.longgetHitCount(Class<?> cls) Deprecated.- should use getHitCount(String c)longGets 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<?> cls) Deprecated.- should use getReadCount(String c)longGets 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<?> cls) Deprecated.- should use getTotalHitCount(String c)longGets 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<?> cls) Deprecated.- should use getTotalReadCount(String c)longGets number of total read requests for the given class since start.longGets number of total write requests since start.longgetTotalWriteCount(Class<?> cls) Deprecated.- should use getTotalWriteCount(String c)longGets number of total write requests for the given class since start.longGets number of total write requests since last reset.longgetWriteCount(Class<?> cls) Deprecated.- should use getWriteCount(String c)longGets number of total write requests for the given class since last reset.booleanReturns whether or not statistics will be collected.voidreset()Clears all accumulated statistics.since()Gets the time of last reset.start()Gets the time of start.toMap()
-
Method Details
-
getReadCount
long getReadCount()Gets number of total read requests since last reset. -
getHitCount
long getHitCount()Gets number of total read requests that has been found in cache since last reset. -
getWriteCount
long getWriteCount()Gets number of total write requests since last reset. -
getTotalReadCount
long getTotalReadCount()Gets number of total read requests since start. -
getTotalHitCount
long getTotalHitCount()Gets number of total read requests that has been found in cache since start. -
getTotalWriteCount
long getTotalWriteCount()Gets number of total write requests since start. -
getReadCount
Deprecated.- should use getReadCount(String c)Gets number of total read requests for the given class since last reset. -
getReadCount
Gets number of total read requests for the given class since last reset. -
getHitCount
Deprecated.- should use getHitCount(String c)Gets number of total read requests that has been found in cache for the given class since last reset. -
getHitCount
Gets number of total read requests that has been found in cache for the given class since last reset. -
getWriteCount
Deprecated.- should use getWriteCount(String c)Gets number of total write requests for the given class since last reset. -
getWriteCount
Gets number of total write requests for the given class since last reset. -
getTotalReadCount
Deprecated.- should use getTotalReadCount(String c)Gets number of total read requests for the given class since start. -
getTotalReadCount
Gets number of total read requests for the given class since start. -
getTotalHitCount
Gets number of total read requests that has been found in cache for the given class since start. -
getTotalHitCount
Deprecated.- should use getTotalHitCount(String c)Gets number of total read requests that has been found in cache for the given class since start. -
getTotalWriteCount
Gets number of total write requests for the given class since start. -
getTotalWriteCount
Deprecated.- should use getTotalWriteCount(String c)Gets number of total write requests for the given class since start. -
since
Date since()Gets the time of last reset. -
start
Date start()Gets the time of start. -
reset
void reset()Clears all accumulated statistics. -
isEnabled
boolean isEnabled()Returns whether or not statistics will be collected. -
classNames
Returns the types that are known to this cache being tracked. -
toMap
-