Interface IMetricsSink
-
- All Superinterfaces:
AutoCloseable
public interface IMetricsSink extends AutoCloseable
The metrics sink interface.Implementations of this interface consume the
MetricsRecord
gathered by Metrics Manager. The Metrics Manager pushes theMetricsRecord
to 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 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 configurationvoid
init(Map<String,Object> conf, SinkContext context)
Initialize the MetricsSinkvoid
processRecord(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:
close
in interfaceAutoCloseable
-
-