public class HitCollector extends Object implements StatusSource, StatisticsSource, com.escenic.jmx.HitCollectorMXBean
Modifier and Type | Class and Description |
---|---|
static class |
HitCollector.StatsKeys |
Constructor and Description |
---|
HitCollector() |
Modifier and Type | Method and Description |
---|---|
long |
getAggregatedDuration() |
String |
getDenominator() |
String |
getDescription() |
long |
getDuration() |
String |
getFailureDescription() |
int |
getHits() |
float |
getLastLoad() |
long |
getLastReset() |
long |
getMaxDuration() |
int |
getMisses() |
String |
getReport()
Returns a JSTLed enabled report
|
String |
getReport(String type)
Return a status report for the JVM.
|
JSONMap |
getReportAsJson() |
Number |
getStatistic(String pStatisticKey)
The different statistics metrics of the implementing class.
|
Set |
getStatisticKeys()
The possible statistics for a HitCollector:
hits (an Integer)
|
int |
getTotalHits() |
int |
getTotalMisses() |
void |
hit(long pDuration) |
void |
hit(long pDuration,
boolean pSuccess) |
void |
miss(long pDuration) |
void |
reset()
Reset any counters
|
void |
resetTotals() |
void |
setDenominator(String pDenominator) |
void |
setDescription(String pDescription) |
void |
setFailureDescription(String pFailureDescription)
The description of a miss.
|
String |
toString() |
public String getReport()
public String getReport(String type)
getReport
in interface StatusSource
public JSONMap getReportAsJson()
public void reset()
StatusSource
reset
in interface com.escenic.jmx.HitCollectorMXBean
reset
in interface StatusSource
public void resetTotals()
public void hit(long pDuration, boolean pSuccess)
public void hit(long pDuration)
public void miss(long pDuration)
public void setDescription(String pDescription)
public String getDescription()
public void setDenominator(String pDenominator)
public String getDenominator()
public void setFailureDescription(String pFailureDescription)
null
or empty, the default text is used.pFailureDescription
- The description of a failure.public String getFailureDescription()
public int getHits()
getHits
in interface com.escenic.jmx.HitCollectorMXBean
public int getMisses()
getMisses
in interface com.escenic.jmx.HitCollectorMXBean
public int getTotalHits()
getTotalHits
in interface com.escenic.jmx.HitCollectorMXBean
public int getTotalMisses()
getTotalMisses
in interface com.escenic.jmx.HitCollectorMXBean
public long getAggregatedDuration()
getAggregatedDuration
in interface com.escenic.jmx.HitCollectorMXBean
public long getDuration()
getDuration
in interface com.escenic.jmx.HitCollectorMXBean
public long getMaxDuration()
getMaxDuration
in interface com.escenic.jmx.HitCollectorMXBean
public float getLastLoad()
getLastLoad
in interface com.escenic.jmx.HitCollectorMXBean
public long getLastReset()
getLastReset
in interface com.escenic.jmx.HitCollectorMXBean
public Number getStatistic(String pStatisticKey)
StatisticsSource
getStatistic
in interface StatisticsSource
pStatisticKey
- the key of the metric wanted. See StatisticsSource.getStatisticKeys()
for a list of valid keys.StatisticsSource.getStatisticKeys()
public Set getStatisticKeys()
getStatisticKeys
in interface StatisticsSource
Set
of String
keys. It will
contain at least one key.StatisticsSource.getStatistic(String)
© 1998- 2021 Escenic AS