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 numeric metric data point.
|
void |
addDataPoint(String key,
long timestamp,
String value)
Add a string 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)
MetricDataPayloadBuilderaddDataPoint in interface MetricDataPayloadBuilderkey - identifies the metrictimestamp - the time the metric was collectedvalue - the numeric value of the metricmetricType - the type of metricpublic void addDataPoint(String key, long timestamp, String value)
MetricDataPayloadBuilderMetricType.STRING.addDataPoint in interface MetricDataPayloadBuilderkey - identifies the metrictimestamp - the time the metric was collectedvalue - the string value of the metricpublic String toPayload()
toPayload in interface MetricDataPayloadBuilderpublic int getNumberDataPoints()
getNumberDataPoints in interface MetricDataPayloadBuilderpublic 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–2017 Red Hat, Inc.. All rights reserved.