public class StatsCollector extends Object implements Stats, JmxStatisticsExposer
Modifier and Type | Class and Description |
---|---|
static class |
StatsCollector.Factory |
Constructor and Description |
---|
StatsCollector() |
Modifier and Type | Method and Description |
---|---|
long |
getAverageReadTime() |
long |
getAverageRemoveTime() |
long |
getAverageWriteTime() |
int |
getCurrentNumberOfEntries()
Returns the number of entries currently in this cache instance.
|
long |
getEvictions() |
double |
getHitRatio() |
long |
getHits() |
long |
getMisses() |
int |
getNumberOfEntries() |
double |
getReadWriteRatio() |
long |
getRemoveHits() |
long |
getRemoveMisses() |
long |
getRetrievals() |
boolean |
getStatisticsEnabled()
Returns whether an interceptor's statistics are being captured.
|
long |
getStores() |
long |
getTimeSinceReset() |
long |
getTimeSinceStart() |
long |
getTotalNumberOfEntries()
Number of entries stored in cache since the cache started running.
|
void |
injectDependencies(TimeService timeService,
DataContainer dataContainer,
Configuration configuration) |
void |
recordEviction() |
void |
recordHits(int hits,
long time) |
void |
recordMisses(int misses,
long time) |
void |
recordRemoveHits(int removes,
long time) |
void |
recordRemoveMisses(int removes) |
void |
recordStores(int stores,
long time) |
void |
reset()
Reset statistics
|
void |
resetStatistics()
Resets an interceptor's cache statistics
|
void |
setStatisticsEnabled(boolean enabled)
Enables or disables statistics at runtime.
|
void |
start() |
public void injectDependencies(TimeService timeService, DataContainer dataContainer, Configuration configuration)
public void start()
public long getHits()
public long getMisses()
public long getRemoveHits()
getRemoveHits
in interface Stats
public long getRemoveMisses()
getRemoveMisses
in interface Stats
public long getStores()
public long getRetrievals()
getRetrievals
in interface Stats
public long getEvictions()
getEvictions
in interface Stats
public double getHitRatio()
public double getReadWriteRatio()
public long getAverageReadTime()
getAverageReadTime
in interface Stats
public long getAverageWriteTime()
getAverageWriteTime
in interface Stats
public long getAverageRemoveTime()
getAverageRemoveTime
in interface Stats
public void reset()
Stats
public boolean getStatisticsEnabled()
JmxStatisticsExposer
getStatisticsEnabled
in interface JmxStatisticsExposer
public void setStatisticsEnabled(boolean enabled)
Stats
setStatisticsEnabled
in interface JmxStatisticsExposer
setStatisticsEnabled
in interface Stats
enabled
- boolean indicating whether statistics should be enable or notpublic int getNumberOfEntries()
public long getTimeSinceStart()
getTimeSinceStart
in interface Stats
public long getTimeSinceReset()
getTimeSinceReset
in interface Stats
public int getCurrentNumberOfEntries()
Stats
getCurrentNumberOfEntries
in interface Stats
public long getTotalNumberOfEntries()
Stats
getTotalNumberOfEntries
in interface Stats
public void resetStatistics()
JmxStatisticsExposer
resetStatistics
in interface JmxStatisticsExposer
public void recordMisses(int misses, long time)
public void recordHits(int hits, long time)
public void recordEviction()
public void recordStores(int stores, long time)
public void recordRemoveHits(int removes, long time)
public void recordRemoveMisses(int removes)
Copyright © 2023 JBoss, a division of Red Hat. All rights reserved.