public interface MetricStore extends AutoCloseable
Modifier and Type | Interface and Description |
---|---|
static interface |
MetricStore.ScanCallback
Interface used to callback metrics results from a scan.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Close the metric store.
|
void |
insert(Metric metric)
Stores a metric in the store.
|
boolean |
populateValue(Metric metric)
Fill out the numeric values for a metric.
|
void |
prepare(Map<String,Object> config,
StormMetricsRegistry metricsRegistry)
Create metric store instance using the configurations provided via the config map.
|
void |
scan(FilterOptions filter,
MetricStore.ScanCallback scanCallback)
Scans all metrics in the store and returns the ones matching the specified filtering options.
|
void prepare(Map<String,Object> config, StormMetricsRegistry metricsRegistry) throws MetricException
config
- Storm config mapmetricsRegistry
- The Nimbus daemon metrics registryMetricException
- on preparation errorvoid insert(Metric metric) throws MetricException
metric
- Metric to storeMetricException
- on errorboolean populateValue(Metric metric) throws MetricException
metric
- Metric to populateMetricException
- on errorvoid close()
close
in interface AutoCloseable
void scan(FilterOptions filter, MetricStore.ScanCallback scanCallback) throws MetricException
filter
- options to filter byscanCallback
- callback for each Metric foundMetricException
- on errorCopyright © 2023 The Apache Software Foundation. All rights reserved.