T
- type of the RestfulGateway
from which to retrieve the metric query service
path.public class MetricFetcherImpl<T extends RestfulGateway> extends Object implements MetricFetcher
MetricFetcher
which fetches metrics from the MetricQueryServiceGateway
.Constructor and Description |
---|
MetricFetcherImpl(GatewayRetriever<T> retriever,
MetricQueryServiceRetriever queryServiceRetriever,
Executor executor,
Time timeout,
long updateInterval) |
Modifier and Type | Method and Description |
---|---|
static <T extends RestfulGateway> |
fromConfiguration(Configuration configuration,
MetricQueryServiceRetriever metricQueryServiceGatewayRetriever,
GatewayRetriever<T> dispatcherGatewayRetriever,
ExecutorService executor) |
long |
getLastUpdateTime() |
MetricStore |
getMetricStore()
Returns the MetricStore containing all stored metrics.
|
void |
update()
This method can be used to signal this MetricFetcher that the metrics are still in use and
should be updated.
|
public MetricFetcherImpl(GatewayRetriever<T> retriever, MetricQueryServiceRetriever queryServiceRetriever, Executor executor, Time timeout, long updateInterval)
public MetricStore getMetricStore()
getMetricStore
in interface MetricFetcher
public void update()
update
in interface MetricFetcher
public long getLastUpdateTime()
getLastUpdateTime
in interface MetricFetcher
@Nonnull public static <T extends RestfulGateway> MetricFetcherImpl<T> fromConfiguration(Configuration configuration, MetricQueryServiceRetriever metricQueryServiceGatewayRetriever, GatewayRetriever<T> dispatcherGatewayRetriever, ExecutorService executor)
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.