Interface IMetricsSink
-
- All Superinterfaces:
AutoCloseable
public interface IMetricsSink extends AutoCloseable
The metrics sink interface.Implementations of this interface consume the
MetricsRecordgathered by Metrics Manager. The Metrics Manager pushes theMetricsRecordto the sink usingprocessRecord(MetricsRecord)method. Andflush()is called at an interval according to the configuration
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidclose()Closes this stream and releases any system resources associated with it.voidflush()Flush any buffered metrics It would be called at an interval according to the configurationvoidinit(Map<String,Object> conf, SinkContext context)Initialize the MetricsSinkvoidprocessRecord(MetricsRecord record)Process a metrics record in the sink
-
-
-
Method Detail
-
init
void init(Map<String,Object> conf, SinkContext context)
Initialize the MetricsSink- Parameters:
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.
-
processRecord
void processRecord(MetricsRecord record)
Process a metrics record in the sink- Parameters:
record- the record to put
-
flush
void flush()
Flush any buffered metrics It would be called at an interval according to the configuration
-
close
void close()
Closes this stream and releases any system resources associated with it. If the stream is already closed then invoking this method has no effect.- Specified by:
closein interfaceAutoCloseable
-
-