public class JsonDBRawMetrics extends Object implements RawMetricsHandler
| Modifier and Type | Field and Description |
|---|---|
static com.fasterxml.jackson.core.type.TypeReference<Map<String,Boolean>> |
TYPE_REFERENCE |
static com.fasterxml.jackson.core.type.TypeReference<Map<String,RawMetrics>> |
VALUE_TYPE_REF |
| Constructor and Description |
|---|
JsonDBRawMetrics(JsonDB jsonDB) |
| Modifier and Type | Method and Description |
|---|---|
void |
curate(Set<String> activeIntegrationIds)
If Integrations get deleted we should also delete their metrics
|
void |
curate(String integrationId,
Map<String,RawMetrics> metrics,
Set<String> livePodIds)
Adds the RawMetrics of dead pods to a special HISTORY bucket.
|
Map<String,RawMetrics> |
getRawMetrics(String integrationId)
Obtains all RawMetrics entries in the DB for the current integration
|
void |
persist(RawMetrics rawMetrics)
Persists the latest metrics of a live pod to the database.
|
public static final com.fasterxml.jackson.core.type.TypeReference<Map<String,Boolean>> TYPE_REFERENCE
public static final com.fasterxml.jackson.core.type.TypeReference<Map<String,RawMetrics>> VALUE_TYPE_REF
public JsonDBRawMetrics(JsonDB jsonDB)
public void persist(RawMetrics rawMetrics)
persist in interface RawMetricsHandlerpublic Map<String,RawMetrics> getRawMetrics(String integrationId) throws IOException
getRawMetrics in interface RawMetricsHandlerintegrationId - - the integrationId for which we are obtaining the metricsIOExceptionpublic void curate(String integrationId, Map<String,RawMetrics> metrics, Set<String> livePodIds) throws IOException
curate in interface RawMetricsHandlerintegrationId - metrics - livePodIds - IOExceptionpublic void curate(Set<String> activeIntegrationIds) throws IOException, com.fasterxml.jackson.databind.JsonMappingException
curate in interface RawMetricsHandleractiveIntegrationIds - IOExceptioncom.fasterxml.jackson.databind.JsonMappingExceptionCopyright © 2016–2019 Red Hat. All rights reserved.