public interface StorageAdapter extends MetricStorage, AvailStorage, InventoryStorage
| Modifier and Type | Method and Description |
|---|---|
MonitorServiceConfiguration.StorageAdapterConfiguration |
getStorageAdapterConfiguration() |
void |
initialize(String feedId,
MonitorServiceConfiguration.StorageAdapterConfiguration config,
Diagnostics diag,
HttpClientBuilder httpClientBuilder)
Initializes the storage adapter.
|
void |
shutdown()
Clean up and stop whatever the storage adapter is doing.
|
void |
storeAvails(Set<AvailDataPoint> datapoints,
long waitMillis)
Stores the given availability check data points.
|
void |
storeMetrics(Set<MetricDataPoint> datapoints,
long waitMillis)
Stores the given collected metric data points.
|
createMetricDataPayloadBuilder, createMetricTagPayloadBuilder, store, storecreateAvailDataPayloadBuilder, storeresourcesAdded, resourcesRemovedvoid initialize(String feedId, MonitorServiceConfiguration.StorageAdapterConfiguration config, Diagnostics diag, HttpClientBuilder httpClientBuilder)
feedId - identifies the feed that is storing dataconfig - the configuration of the storage adapterdiag - the object used to track internal diagnostic data for the storage adapterhttpClientBuilder - used to communicate with the storage servervoid shutdown()
MonitorServiceConfiguration.StorageAdapterConfiguration getStorageAdapterConfiguration()
void storeMetrics(Set<MetricDataPoint> datapoints, long waitMillis)
waitMillis is provided, it indicates the caller is willing
to wait up to that amount of milliseconds for the store to complete before returning.
Note that if the given data points contain data across multiple tenants, the waitMillis will be the wait
time for each storage attempt per tenant (in other words, if you ask to wait 1000 milliseconds and pass in
data points for two different tenants, the wait time could be up to 2000 milliseconds because you will
wait 1000 for storing the data for tenant 1 and 1000 for storing data for tenant 2).datapoints - the data to be storedwaitMillis - the amount of milliseconds to wait for the store to complete before returning (0==no wait).void storeAvails(Set<AvailDataPoint> datapoints, long waitMillis)
waitMillis is provided, it indicates the caller is willing
to wait up to that amount of milliseconds for the store to complete before returning.
Note that if the given data points contain data across multiple tenants, the waitMillis will be the wait
time for each storage attempt per tenant (in other words, if you ask to wait 1000 milliseconds and pass in
data points for two different tenants, the wait time could be up to 2000 milliseconds because you will
wait 1000 for storing the data for tenant 1 and 1000 for storing data for tenant 2).datapoints - the data to be storedwaitMillis - the amount of milliseconds to wait for the store to complete before returning (0==no wait).Copyright © 2015–2016 Red Hat, Inc.. All rights reserved.