public class PrefixMetricGroupExporter extends AbstractMetricExporter
PrefixMetricReader
. Exports
all metrics whose name starts with a prefix (or all metrics if the prefix is empty).Constructor and Description |
---|
PrefixMetricGroupExporter(PrefixMetricReader reader,
PrefixMetricWriter writer)
Create a new exporter for metrics to a writer based on an empty prefix for the
metric names.
|
PrefixMetricGroupExporter(PrefixMetricReader reader,
PrefixMetricWriter writer,
String prefix)
Create a new exporter for metrics to a writer based on a prefix for the metric
names.
|
Modifier and Type | Method and Description |
---|---|
protected Iterable<String> |
groups()
Generate a group of metrics to iterate over in the form of a set of Strings (e.g.
|
protected Iterable<Metric<?>> |
next(String group)
Get the next group of metrics to write.
|
void |
setGroups(Set<String> groups)
The groups to export.
|
protected void |
write(String group,
Collection<Metric<?>> values)
Write the values associated with a group.
|
export, flush, setEarliestTimestamp, setIgnoreTimestamps, setSendLatest
public PrefixMetricGroupExporter(PrefixMetricReader reader, PrefixMetricWriter writer)
reader
- a reader as the source of metricswriter
- the writer to send the metrics topublic PrefixMetricGroupExporter(PrefixMetricReader reader, PrefixMetricWriter writer, String prefix)
reader
- a reader as the source of metricswriter
- the writer to send the metrics toprefix
- the prefix for metrics to exportpublic void setGroups(Set<String> groups)
groups
- the groups to setprotected Iterable<String> groups()
AbstractMetricExporter
groups
in class AbstractMetricExporter
protected Iterable<Metric<?>> next(String group)
AbstractMetricExporter
next
in class AbstractMetricExporter
group
- the group name to writeprotected void write(String group, Collection<Metric<?>> values)
AbstractMetricExporter
write
in class AbstractMetricExporter
group
- the group to writevalues
- the values to writeCopyright © 2015 Pivotal Software, Inc.. All rights reserved.