public class TimeWindowCounterBuilder extends Object
TimeWindowCounters with a specific and consistent set of TimeWindows, and in turn produce PollingMonitoredValues which watch those TimeWindowCounters. Can either
create the TimeWindowCounters from scratch, or 'copy' an existing
MonitoredCounter.| Constructor and Description |
|---|
TimeWindowCounterBuilder(MonitorableRegistry registry,
TimeWindow... windows) |
| Modifier and Type | Method and Description |
|---|---|
CompositeCounter |
build(String baseName,
String baseDescription,
javax.measure.Unit<?> unit)
Builds a new
CompositeCounter, comprised of TimeWindowCounters,
and registers PollingMonitoredValues to detect changes in their
values. |
CompositeCounter |
copyFrom(MonitoredCounter templateCounter)
Creates a new CompositeCounter wrapping TimeWindowCounters (and creating
PollingMonitoredValues), using the supplied counter's name,
description, and unit as the template.
|
CompositeCounter |
wrapCounter(MonitoredCounter templateCounter)
Creates a new CompositeCounter wrapping TimeWindowCounters (and creating
PollingMonitoredValues), using the supplied MonitoredCounter's name,
description, and unit as the template.
|
public TimeWindowCounterBuilder(MonitorableRegistry registry, TimeWindow... windows)
public CompositeCounter build(String baseName, String baseDescription, javax.measure.Unit<?> unit)
CompositeCounter, comprised of TimeWindowCounters,
and registers PollingMonitoredValues to detect changes in their
values.baseName - the base name of the new MonitoredValues, which will have the
window name, e.g. ".60s", appended to it for each windowbaseDescription - the base description of the new MonitoredValues, to be
appended with e.g. " [60s]"unit - the Unit to use for the new valuespublic CompositeCounter copyFrom(MonitoredCounter templateCounter)
templateCounter - a MonitoredCounter whose name, description, and unit should be
copiedpublic CompositeCounter wrapCounter(MonitoredCounter templateCounter)
templateCounter - a Counter whose name, description, and unit should be copiedCopyright © 2009–2019 Performance Co-Pilot. All rights reserved.