Interface DataCacheInstrument
-
- All Known Subinterfaces:
DataCacheJMXInstrumentMBean
- All Known Implementing Classes:
AbstractDataCacheInstrument
,DataCacheJMXInstrument
public interface DataCacheInstrument
Interface for providing instrumented data cache metrics and operations.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
cache(java.lang.String className, boolean enable)
This method is used to enable/disable caching for the specified className.void
clear()
Clears all data from the DataCache.void
collectStatistics(boolean enable)
java.lang.String
getCacheName()
Returns the name of the cachejava.util.Map<java.lang.String,long[]>
getCacheStatistics()
Returns the CacheStatistics for the cache.long
getHitCount()
Returns the hit count since cache statistics were last resetlong
getHitCount(java.lang.String className)
Gets number of total read requests that has been found in cache for the given class since last reset.long
getReadCount()
Returns the read count since cache statistics were last resetlong
getReadCount(java.lang.String className)
Gets number of total read requests for the given class since last reset.java.lang.Boolean
getStatisticsEnabled()
Returns true if cache statistics are currently being calculated.long
getTotalHitCount()
Returns the total hits since start.long
getTotalHitCount(java.lang.String className)
Gets number of total read requests that has been found in cache for the given class since start.long
getTotalReadCount()
Returns the total reads since start.long
getTotalReadCount(java.lang.String className)
Gets number of total read requests for the given class since start.long
getTotalWriteCount()
Returns the total writes since start.long
getTotalWriteCount(java.lang.String className)
Gets number of total write requests for the given class since start.long
getWriteCount()
Returns the write count since cache statistics were last resetlong
getWriteCount(java.lang.String className)
Gets number of total write requests for the given class since last reset.java.util.Map<java.lang.String,java.lang.Boolean>
listKnownTypes()
Returns the names of classes that are known to the cache and whether or not they are currently being cached.void
reset()
Resets cache statisticsjava.util.Date
sinceDate()
Returns date since cache statistics collection were last reset.java.util.Date
startDate()
Returns date cache statistics collection started.
-
-
-
Method Detail
-
getReadCount
long getReadCount(java.lang.String className)
Gets number of total read requests for the given class since last reset.
-
getHitCount
long getHitCount(java.lang.String className)
Gets number of total read requests that has been found in cache for the given class since last reset.
-
getWriteCount
long getWriteCount(java.lang.String className)
Gets number of total write requests for the given class since last reset.
-
getTotalReadCount
long getTotalReadCount(java.lang.String className)
Gets number of total read requests for the given class since start.
-
getTotalHitCount
long getTotalHitCount(java.lang.String className)
Gets number of total read requests that has been found in cache for the given class since start.
-
getTotalWriteCount
long getTotalWriteCount(java.lang.String className)
Gets number of total write requests for the given class since start.
-
getCacheName
java.lang.String getCacheName()
Returns the name of the cache
-
getHitCount
long getHitCount()
Returns the hit count since cache statistics were last reset
-
getReadCount
long getReadCount()
Returns the read count since cache statistics were last reset
-
getTotalHitCount
long getTotalHitCount()
Returns the total hits since start.
-
getTotalReadCount
long getTotalReadCount()
Returns the total reads since start.
-
getTotalWriteCount
long getTotalWriteCount()
Returns the total writes since start.
-
getWriteCount
long getWriteCount()
Returns the write count since cache statistics were last reset
-
reset
void reset()
Resets cache statistics
-
sinceDate
java.util.Date sinceDate()
Returns date since cache statistics collection were last reset.
-
startDate
java.util.Date startDate()
Returns date cache statistics collection started.
-
listKnownTypes
java.util.Map<java.lang.String,java.lang.Boolean> listKnownTypes()
Returns the names of classes that are known to the cache and whether or not they are currently being cached.
-
getStatisticsEnabled
java.lang.Boolean getStatisticsEnabled()
Returns true if cache statistics are currently being calculated. False otherwise.
-
collectStatistics
void collectStatistics(boolean enable)
- Parameters:
enable
- - If true, the cache will start collecting statistics. Else cache statistics will not be collected.
-
cache
void cache(java.lang.String className, boolean enable)
This method is used to enable/disable caching for the specified className.
-
getCacheStatistics
java.util.Map<java.lang.String,long[]> getCacheStatistics()
Returns the CacheStatistics for the cache. The format for this map is: Type(String) => Enabled(Boolean),Read(Long),Hit(Long),Write(Long)
-
clear
void clear()
Clears all data from the DataCache.
-
-