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, setStarted
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
start, stop
public 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()
DataCacheInstrument
getHitCount
in interface DataCacheInstrument
public long getReadCount()
DataCacheInstrument
getReadCount
in interface DataCacheInstrument
public long getTotalHitCount()
DataCacheInstrument
getTotalHitCount
in interface DataCacheInstrument
public long getTotalReadCount()
DataCacheInstrument
getTotalReadCount
in interface DataCacheInstrument
public long getTotalWriteCount()
DataCacheInstrument
getTotalWriteCount
in interface DataCacheInstrument
public long getWriteCount()
DataCacheInstrument
getWriteCount
in interface DataCacheInstrument
public void reset()
DataCacheInstrument
reset
in interface DataCacheInstrument
public Date sinceDate()
DataCacheInstrument
sinceDate
in interface DataCacheInstrument
public Date startDate()
DataCacheInstrument
startDate
in interface DataCacheInstrument
public String getConfigId()
public String getContextRef()
public String getCacheName()
DataCacheInstrument
getCacheName
in interface DataCacheInstrument
public long getWriteCount(String c)
DataCacheInstrument
getWriteCount
in interface DataCacheInstrument
public long getTotalWriteCount(String c)
DataCacheInstrument
getTotalWriteCount
in interface DataCacheInstrument
public long getTotalReadCount(String c)
DataCacheInstrument
getTotalReadCount
in interface DataCacheInstrument
public long getTotalHitCount(String c)
DataCacheInstrument
getTotalHitCount
in interface DataCacheInstrument
public long getReadCount(String c)
DataCacheInstrument
getReadCount
in interface DataCacheInstrument
public long getHitCount(String c)
DataCacheInstrument
getHitCount
in interface DataCacheInstrument
public InstrumentationLevel getLevel()
Instrument
getLevel
in interface Instrument
getLevel
in class AbstractInstrument
public void cache(String className, boolean enable)
DataCacheInstrument
cache
in interface DataCacheInstrument
public Map<String,Boolean> listKnownTypes()
DataCacheInstrument
listKnownTypes
in interface DataCacheInstrument
public void collectStatistics(boolean enable)
collectStatistics
in interface DataCacheInstrument
enable
- - If true, the cache will start collecting statistics. Else cache statistics will not be collected.public Boolean getStatisticsEnabled()
DataCacheInstrument
getStatisticsEnabled
in interface DataCacheInstrument
public Map<String,long[]> getCacheStatistics()
DataCacheInstrument
getCacheStatistics
in interface DataCacheInstrument
public void clear()
DataCacheInstrument
clear
in interface DataCacheInstrument
Copyright © 2006–2019 Apache Software Foundation. All rights reserved.