public interface IMetricsSink
extends java.lang.AutoCloseable
Implementations of this interface consume the MetricsRecord
gathered
by Metrics Manager. The Metrics Manager pushes the MetricsRecord
to the sink using
processRecord(MetricsRecord)
method.
And flush()
is called at an interval according to the configuration
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes this stream and releases any system resources associated
with it.
|
void |
flush()
Flush any buffered metrics
It would be called at an interval according to the configuration
|
void |
init(java.util.Map<java.lang.String,java.lang.Object> conf,
SinkContext context)
Initialize the MetricsSink
|
void |
processRecord(MetricsRecord record)
Process a metrics record in the sink
|
void init(java.util.Map<java.lang.String,java.lang.Object> conf, SinkContext context)
conf
- An unmodifiableMap containing basic configurationcontext
- context objects for Sink to init
Attempts to modify the returned map,
whether direct or via its collection views, result in an UnsupportedOperationException.void processRecord(MetricsRecord record)
record
- the record to putvoid flush()
void close()
close
in interface java.lang.AutoCloseable