net.opentsdb.core
public class IncomingDataPoint extends Object
The data point value is a string in order to accept a wide range of values including floating point and scientific. Before storage, the value will be parsed to the appropriate numeric type.
Note the class is not marked as final since some serializers may want to overload with their own fields or parsing methods.
Constructor and Description |
---|
IncomingDataPoint()
Empty constructor necessary for some de/serializers
|
IncomingDataPoint(String tsuid,
long timestamp,
String value)
Constructor used when working with tsuids
|
IncomingDataPoint(String metric,
long timestamp,
String value,
HashMap<String,String> tags)
Constructor used when working with a metric and tags
|
Modifier and Type | Method and Description |
---|---|
String |
getMetric() |
HashMap<String,String> |
getTags() |
long |
getTimestamp() |
String |
getTSUID() |
String |
getValue() |
void |
setMetric(String metric) |
void |
setTags(HashMap<String,String> tags) |
void |
setTimestamp(long timestamp) |
void |
setTSUID(String tsuid) |
void |
setValue(String value) |
String |
toString() |
public IncomingDataPoint()
public IncomingDataPoint(String metric, long timestamp, String value, HashMap<String,String> tags)
metric
- The metric nametimestamp
- The Unix epoch timestampvalue
- The value as a stringtags
- The tag name/value mappublic String toString()
public final String getMetric()
public final long getTimestamp()
public final String getValue()
public final String getTSUID()
public final void setMetric(String metric)
metric
- the metric to setpublic final void setTimestamp(long timestamp)
timestamp
- the timestamp to setpublic final void setValue(String value)
value
- the value to setpublic final void setTSUID(String tsuid)
tsuid
- the TSUID to set