public final class ThreadPoolExecutorStatusSource extends Object implements StatusSource, StatisticsSource
StatusSource
that collects status report for a ThreadPoolExecutor
.Constructor and Description |
---|
ThreadPoolExecutorStatusSource(ThreadPoolExecutor pExecutor,
String pName) |
Modifier and Type | Method and Description |
---|---|
String |
getReport(String pType)
Return a report for this status
|
Number |
getStatistic(String pKey)
The different statistics metrics of the implementing class.
|
Set<String> |
getStatisticKeys()
The keys that the metrics are available under.
|
void |
reset()
Reset any counters
|
public ThreadPoolExecutorStatusSource(ThreadPoolExecutor pExecutor, String pName)
public String getReport(String pType)
StatusSource
getReport
in interface StatusSource
public void reset()
StatusSource
reset
in interface StatusSource
public Number getStatistic(String pKey)
StatisticsSource
getStatistic
in interface StatisticsSource
pKey
- the key of the metric wanted. See StatisticsSource.getStatisticKeys()
for a list of valid keys.StatisticsSource.getStatisticKeys()
public Set<String> getStatisticKeys()
StatisticsSource
getStatisticKeys
in interface StatisticsSource
Set
of String
keys. It will
contain at least one key.StatisticsSource.getStatistic(String)
© 1998- 2021 Escenic AS