public class MetricCopyExporter extends AbstractMetricExporter
Exporter
that "exports" by copying metric data from a source
MetricReader
to a destination MetricWriter
.Constructor and Description |
---|
MetricCopyExporter(MetricReader reader,
MetricWriter writer)
Create a new
MetricCopyExporter instance. |
MetricCopyExporter(MetricReader reader,
MetricWriter writer,
String prefix)
Create a new
MetricCopyExporter instance. |
Modifier and Type | Method and Description |
---|---|
void |
flush() |
protected Iterable<Metric<?>> |
next(String group)
Get the next group of metrics to write.
|
void |
setExcludes(String... excludes)
Set the exclude patterns used to filter metrics.
|
void |
setIncludes(String... includes)
Set the include patterns used to filter metrics.
|
protected void |
write(String group,
Collection<Metric<?>> values)
Write the values associated with a group.
|
export, groups, setEarliestTimestamp, setIgnoreTimestamps, setSendLatest
public MetricCopyExporter(MetricReader reader, MetricWriter writer)
MetricCopyExporter
instance.reader
- the metric readerwriter
- the metric writerpublic MetricCopyExporter(MetricReader reader, MetricWriter writer, String prefix)
MetricCopyExporter
instance.reader
- the metric readerwriter
- the metric writerprefix
- the name prefixpublic void setIncludes(String... includes)
includes
- the include patternspublic void setExcludes(String... excludes)
excludes
- the exclude patternsprotected 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 writepublic void flush()
flush
in class AbstractMetricExporter
Copyright © 2015 Pivotal Software, Inc.. All rights reserved.