public abstract class AbstractMetricExporter extends Object implements Exporter, Closeable, Flushable
Constructor and Description |
---|
AbstractMetricExporter(String prefix) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
void |
export()
Export metric data.
|
void |
flush() |
protected Iterable<String> |
groups()
Generate a group of metrics to iterate over in the form of a set of Strings (e.g.
|
protected abstract Iterable<Metric<?>> |
next(String group)
Get the next group of metrics to write.
|
void |
setEarliestTimestamp(Date earliestTimestamp)
The earliest time for which data will be exported.
|
void |
setIgnoreTimestamps(boolean ignoreTimestamps)
Ignore timestamps (export all metrics).
|
void |
setSendLatest(boolean sendLatest)
Send only the data that changed since the last export.
|
protected abstract void |
write(String group,
Collection<Metric<?>> values)
Write the values associated with a group.
|
public AbstractMetricExporter(String prefix)
public void setEarliestTimestamp(Date earliestTimestamp)
earliestTimestamp
- the timestamp to setpublic void setIgnoreTimestamps(boolean ignoreTimestamps)
ignoreTimestamps
- the flag to setpublic void setSendLatest(boolean sendLatest)
sendLatest
- the flag to setpublic void export()
Exporter
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
IOException
protected Iterable<String> groups()
protected abstract void write(String group, Collection<Metric<?>> values)
group
- the group to writevalues
- the values to writeCopyright © 2017 Pivotal Software, Inc.. All rights reserved.