public class MetricDataPayloadBuilderImpl extends Object implements MetricDataPayloadBuilder
| Constructor and Description |
|---|
MetricDataPayloadBuilderImpl() |
| Modifier and Type | Method and Description |
|---|---|
void |
addDataPoint(String key,
long timestamp,
double value,
org.hawkular.metrics.client.common.MetricType metricType)
Add a metric data point.
|
int |
getNumberDataPoints() |
String |
getTenantId() |
void |
setTenantId(String tenantId)
If the metric data is to be stored with a special tenant ID, this sets that tenant ID.
|
Map<String,List<Map<String,Object>>> |
toObjectPayload() |
String |
toPayload() |
public void addDataPoint(String key, long timestamp, double value, org.hawkular.metrics.client.common.MetricType metricType)
MetricDataPayloadBuilderMetricDataPayloadBuilder.toPayload() to get the payload message that can be used to
send to the storage backend via the storage adapter.addDataPoint in interface MetricDataPayloadBuilderkey - identifies the metrictimestamp - the time the metric was collectedvalue - the value of the metricmetricType - the type of metricpublic String toPayload()
toPayload in interface MetricDataPayloadBuilderpublic int getNumberDataPoints()
getNumberDataPoints in interface MetricDataPayloadBuilderadded to the payloadpublic void setTenantId(String tenantId)
MetricDataPayloadBuildersetTenantId in interface MetricDataPayloadBuildertenantId - the tenant ID to associate the metric data with. May be null.public String getTenantId()
getTenantId in interface MetricDataPayloadBuilderCopyright © 2015–2016 Red Hat, Inc.. All rights reserved.