Package org.apache.openjpa.datacache
Interface CacheStatistics
- 
- All Superinterfaces:
- java.io.Serializable
 - All Known Subinterfaces:
- CacheStatisticsSPI
 - All Known Implementing Classes:
- CacheStatisticsImpl
 
 public interface CacheStatistics extends java.io.SerializableCounts 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 asjava.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 genericjava.lang.Object.- Since:
- 1.3.0
 
- 
- 
Method SummaryAll Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description java.util.Set<java.lang.String>classNames()Returns the types that are known to this cache being tracked.longgetHitCount()Gets number of total read requests that has been found in cache since last reset.longgetHitCount(java.lang.Class<?> cls)Deprecated.- should use getHitCount(String c)longgetHitCount(java.lang.String c)Gets number of total read requests that has been found in cache for the given class since last reset.longgetReadCount()Gets number of total read requests since last reset.longgetReadCount(java.lang.Class<?> cls)Deprecated.- should use getReadCount(String c)longgetReadCount(java.lang.String c)Gets number of total read requests for the given class since last reset.longgetTotalHitCount()Gets number of total read requests that has been found in cache since start.longgetTotalHitCount(java.lang.Class<?> cls)Deprecated.- should use getTotalHitCount(String c)longgetTotalHitCount(java.lang.String c)Gets number of total read requests that has been found in cache for the given class since start.longgetTotalReadCount()Gets number of total read requests since start.longgetTotalReadCount(java.lang.Class<?> cls)Deprecated.- should use getTotalReadCount(String c)longgetTotalReadCount(java.lang.String c)Gets number of total read requests for the given class since start.longgetTotalWriteCount()Gets number of total write requests since start.longgetTotalWriteCount(java.lang.Class<?> cls)Deprecated.- should use getTotalWriteCount(String c)longgetTotalWriteCount(java.lang.String c)Gets number of total write requests for the given class since start.longgetWriteCount()Gets number of total write requests since last reset.longgetWriteCount(java.lang.Class<?> cls)Deprecated.- should use getWriteCount(String c)longgetWriteCount(java.lang.String c)Gets number of total write requests for the given class since last reset.booleanisEnabled()Returns whether or not statistics will be collected.voidreset()Clears all accumulated statistics.java.util.Datesince()Gets the time of last reset.java.util.Datestart()Gets the time of start.java.util.Map<java.lang.String,long[]>toMap()
 
- 
- 
- 
Method Detail- 
getReadCountlong getReadCount() Gets number of total read requests since last reset.
 - 
getHitCountlong getHitCount() Gets number of total read requests that has been found in cache since last reset.
 - 
getWriteCountlong getWriteCount() Gets number of total write requests since last reset.
 - 
getTotalReadCountlong getTotalReadCount() Gets number of total read requests since start.
 - 
getTotalHitCountlong getTotalHitCount() Gets number of total read requests that has been found in cache since start.
 - 
getTotalWriteCountlong getTotalWriteCount() Gets number of total write requests since start.
 - 
getReadCount@Deprecated long getReadCount(java.lang.Class<?> cls) Deprecated.- should use getReadCount(String c)Gets number of total read requests for the given class since last reset.
 - 
getReadCountlong getReadCount(java.lang.String c) Gets number of total read requests for the given class since last reset.
 - 
getHitCount@Deprecated long getHitCount(java.lang.Class<?> cls) 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.
 - 
getHitCountlong getHitCount(java.lang.String c) Gets number of total read requests that has been found in cache for the given class since last reset.
 - 
getWriteCount@Deprecated long getWriteCount(java.lang.Class<?> cls) Deprecated.- should use getWriteCount(String c)Gets number of total write requests for the given class since last reset.
 - 
getWriteCountlong getWriteCount(java.lang.String c) Gets number of total write requests for the given class since last reset.
 - 
getTotalReadCount@Deprecated long getTotalReadCount(java.lang.Class<?> cls) Deprecated.- should use getTotalReadCount(String c)Gets number of total read requests for the given class since start.
 - 
getTotalReadCountlong getTotalReadCount(java.lang.String c) Gets number of total read requests for the given class since start.
 - 
getTotalHitCountlong getTotalHitCount(java.lang.String c) Gets number of total read requests that has been found in cache for the given class since start.
 - 
getTotalHitCount@Deprecated long getTotalHitCount(java.lang.Class<?> cls) Deprecated.- should use getTotalHitCount(String c)Gets number of total read requests that has been found in cache for the given class since start.
 - 
getTotalWriteCountlong getTotalWriteCount(java.lang.String c) Gets number of total write requests for the given class since start.
 - 
getTotalWriteCount@Deprecated long getTotalWriteCount(java.lang.Class<?> cls) Deprecated.- should use getTotalWriteCount(String c)Gets number of total write requests for the given class since start.
 - 
sincejava.util.Date since() Gets the time of last reset.
 - 
startjava.util.Date start() Gets the time of start.
 - 
resetvoid reset() Clears all accumulated statistics.
 - 
isEnabledboolean isEnabled() Returns whether or not statistics will be collected.
 - 
classNamesjava.util.Set<java.lang.String> classNames() Returns the types that are known to this cache being tracked.
 - 
toMapjava.util.Map<java.lang.String,long[]> toMap() 
 
- 
 
-