@InterfaceAudience.Public @InterfaceStability.Evolving public interface MetricsSink extends MetricsPlugin
Implementations of this interface consume the MetricsRecord
generated
from MetricsSource
. It registers with MetricsSystem
which
periodically pushes the MetricsRecord
to the sink using
putMetrics(MetricsRecord)
method. If the implementing class also
implements Closeable
, then the MetricsSystem will close the sink when
it is stopped.
Modifier and Type | Method and Description |
---|---|
void |
flush()
Flush any buffered metrics
|
void |
putMetrics(MetricsRecord record)
Put a metrics record in the sink
|
init
void putMetrics(MetricsRecord record)
record
- the record to putvoid flush()
Copyright © 2021 Apache Software Foundation. All rights reserved.