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.
|
close, export, flush, setEarliestTimestamp, setIgnoreTimestamps, setSendLatestpublic 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()
AbstractMetricExportergroups in class AbstractMetricExporterprotected Iterable<Metric<?>> next(String group)
AbstractMetricExporternext in class AbstractMetricExportergroup - the group name to writeprotected void write(String group, Collection<Metric<?>> values)
AbstractMetricExporterwrite in class AbstractMetricExportergroup - the group to writevalues - the values to writeCopyright © 2016 Pivotal Software, Inc.. All rights reserved.