public abstract class AbstractDataCacheInstrument extends AbstractInstrument implements DataCacheInstrument
| Modifier and Type | Field and Description |
|---|---|
static long |
NO_STATS
Value indicating that cache statistics are not available.
|
| Constructor and Description |
|---|
AbstractDataCacheInstrument() |
| Modifier and Type | Method and Description |
|---|---|
void |
cache(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) |
String |
getCacheName()
Returns the name of the cache
|
Map<String,long[]> |
getCacheStatistics()
Returns the CacheStatistics for the cache.
|
String |
getConfigId() |
String |
getContextRef() |
long |
getHitCount()
Returns the hit count since cache statistics were last reset
|
long |
getHitCount(String c)
Gets number of total read requests that has been found in cache for the given class since last reset.
|
InstrumentationLevel |
getLevel()
Gets the instrumentation level of this instrument.
|
long |
getReadCount()
Returns the read count since cache statistics were last reset
|
long |
getReadCount(String c)
Gets number of total read requests for the given class since last reset.
|
Boolean |
getStatisticsEnabled()
Returns true if cache statistics are currently being calculated.
|
long |
getTotalHitCount()
Returns the total hits since start.
|
long |
getTotalHitCount(String c)
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(String c)
Gets number of total read requests for the given class since start.
|
long |
getTotalWriteCount()
Returns the total writes since start.
|
long |
getTotalWriteCount(String c)
Gets number of total write requests for the given class since start.
|
long |
getWriteCount()
Returns the write count since cache statistics were last reset
|
long |
getWriteCount(String c)
Gets number of total write requests for the given class since last reset.
|
Map<String,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 statistics
|
void |
setConfigId(String cid) |
void |
setContextRef(String cref) |
void |
setDataCache(DataCache dc) |
void |
setDataCacheManager(DataCacheManager dcm) |
Date |
sinceDate()
Returns date since cache statistics collection were last reset.
|
Date |
startDate()
Returns date cache statistics collection started.
|
getContext, getName, getOptions, getProvider, initialize, isStarted, restart, setContext, setOptions, setProvider, setStartedclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitstart, stoppublic static final long NO_STATS
public void setDataCache(DataCache dc)
public void setDataCacheManager(DataCacheManager dcm)
public void setConfigId(String cid)
public void setContextRef(String cref)
public long getHitCount()
DataCacheInstrumentgetHitCount in interface DataCacheInstrumentpublic long getReadCount()
DataCacheInstrumentgetReadCount in interface DataCacheInstrumentpublic long getTotalHitCount()
DataCacheInstrumentgetTotalHitCount in interface DataCacheInstrumentpublic long getTotalReadCount()
DataCacheInstrumentgetTotalReadCount in interface DataCacheInstrumentpublic long getTotalWriteCount()
DataCacheInstrumentgetTotalWriteCount in interface DataCacheInstrumentpublic long getWriteCount()
DataCacheInstrumentgetWriteCount in interface DataCacheInstrumentpublic void reset()
DataCacheInstrumentreset in interface DataCacheInstrumentpublic Date sinceDate()
DataCacheInstrumentsinceDate in interface DataCacheInstrumentpublic Date startDate()
DataCacheInstrumentstartDate in interface DataCacheInstrumentpublic String getConfigId()
public String getContextRef()
public String getCacheName()
DataCacheInstrumentgetCacheName in interface DataCacheInstrumentpublic long getWriteCount(String c)
DataCacheInstrumentgetWriteCount in interface DataCacheInstrumentpublic long getTotalWriteCount(String c)
DataCacheInstrumentgetTotalWriteCount in interface DataCacheInstrumentpublic long getTotalReadCount(String c)
DataCacheInstrumentgetTotalReadCount in interface DataCacheInstrumentpublic long getTotalHitCount(String c)
DataCacheInstrumentgetTotalHitCount in interface DataCacheInstrumentpublic long getReadCount(String c)
DataCacheInstrumentgetReadCount in interface DataCacheInstrumentpublic long getHitCount(String c)
DataCacheInstrumentgetHitCount in interface DataCacheInstrumentpublic InstrumentationLevel getLevel()
InstrumentgetLevel in interface InstrumentgetLevel in class AbstractInstrumentpublic void cache(String className, boolean enable)
DataCacheInstrumentcache in interface DataCacheInstrumentpublic Map<String,Boolean> listKnownTypes()
DataCacheInstrumentlistKnownTypes in interface DataCacheInstrumentpublic void collectStatistics(boolean enable)
collectStatistics in interface DataCacheInstrumentenable - - If true, the cache will start collecting statistics. Else cache statistics will not be collected.public Boolean getStatisticsEnabled()
DataCacheInstrumentgetStatisticsEnabled in interface DataCacheInstrumentpublic Map<String,long[]> getCacheStatistics()
DataCacheInstrumentgetCacheStatistics in interface DataCacheInstrumentpublic void clear()
DataCacheInstrumentclear in interface DataCacheInstrumentCopyright © 2006–2022 Apache Software Foundation. All rights reserved.