public class CacheStatisticCollector extends Object
Constructor and Description |
---|
CacheStatisticCollector(TimeService timeService) |
Modifier and Type | Method and Description |
---|---|
void |
addLocalValue(ExtendedStatistic stat,
double value)
Adds a value to a local statistic.
|
void |
addRemoteValue(ExtendedStatistic stat,
double value)
Adds a value to a remote statistic.
|
static double |
convertNanosToMicro(double nanos) |
static double |
convertNanosToSeconds(double nanos) |
void |
dumpTo(PrintWriter writer)
Prints the cache statistics values to a
PrintStream . |
void |
dumpTo(StringBuilder builder)
Dumps all the cache statistic values to a
StringBuilder |
double |
getAttribute(ExtendedStatistic stat) |
double |
getPercentile(PercentileStatistic stat,
int percentile) |
void |
merge(TransactionStatistics transactionStatistics)
Merges a transaction statistics in this cache statistics.
|
void |
reset()
reset all the statistics collected so far.
|
public CacheStatisticCollector(TimeService timeService)
public final void reset()
public final void merge(TransactionStatistics transactionStatistics)
public final void addLocalValue(ExtendedStatistic stat, double value)
public final void addRemoteValue(ExtendedStatistic stat, double value)
public final double getPercentile(PercentileStatistic stat, int percentile) throws IllegalArgumentException
IllegalArgumentException
- if the percentile request is not in the correct bounds (]0,100[)public final double getAttribute(ExtendedStatistic stat) throws ExtendedStatisticNotFoundException
ExtendedStatisticNotFoundException
- if the statistic is not found.public final void dumpTo(StringBuilder builder)
StringBuilder
public final void dumpTo(PrintWriter writer)
PrintStream
.public static double convertNanosToMicro(double nanos)
public static double convertNanosToSeconds(double nanos)
Copyright © 2018 JBoss, a division of Red Hat. All rights reserved.