com.baidubce.services.tsdb.model
Class Datapoint

java.lang.Object
  extended by com.baidubce.services.tsdb.model.Datapoint

public class Datapoint
extends Object

Represent the model of datapoint for Tsdb.


Constructor Summary
Datapoint()
           
 
Method Summary
 Datapoint addBytesValue(long time, byte[] value)
           
 Datapoint addDoubleValue(long time, double value)
          Add datapoint of double type value.
 Datapoint addLongValue(long time, long value)
          Add datapoint of long type value.
 Datapoint addStringValue(long time, String value)
          Add datapoint of String type value.
 Datapoint addTag(String tagKey, String tagValue)
          Add tag for the datapoint.
 String getField()
           
 String getMetric()
           
 Map<String,String> getTags()
           
 String getType()
           
 List<List<com.fasterxml.jackson.databind.JsonNode>> getValues()
           
 void setField(String field)
           
 void setMetric(String metric)
           
 void setTags(Map<String,String> tags)
           
 void setValues(List<List<com.fasterxml.jackson.databind.JsonNode>> values)
           
 Datapoint withField(String field)
           
 Datapoint withMetric(String metric)
           
 Datapoint withTags(Map<String,String> tags)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Datapoint

public Datapoint()
Method Detail

getMetric

public String getMetric()

setMetric

public void setMetric(String metric)

getField

public String getField()

setField

public void setField(String field)

getTags

public Map<String,String> getTags()

setTags

public void setTags(Map<String,String> tags)

getType

public String getType()

getValues

public List<List<com.fasterxml.jackson.databind.JsonNode>> getValues()

setValues

public void setValues(List<List<com.fasterxml.jackson.databind.JsonNode>> values)

withMetric

public Datapoint withMetric(String metric)

withField

public Datapoint withField(String field)

withTags

public Datapoint withTags(Map<String,String> tags)

addLongValue

public Datapoint addLongValue(long time,
                              long value)
Add datapoint of long type value.

Parameters:
time - datapoint's timestamp
value - datapoint's value
Returns:
Datapoint

addDoubleValue

public Datapoint addDoubleValue(long time,
                                double value)
Add datapoint of double type value.

Parameters:
time - datapoint's timestamp
value - datapoint's value
Returns:
Datapoint

addStringValue

public Datapoint addStringValue(long time,
                                String value)
Add datapoint of String type value.

Parameters:
time - datapoint's timestamp
value - datapoint's value
Returns:
Datapoint

addBytesValue

public Datapoint addBytesValue(long time,
                               byte[] value)

addTag

public Datapoint addTag(String tagKey,
                        String tagValue)
Add tag for the datapoint.

Parameters:
tagKey -
tagValue -
Returns:
Datapoint


Copyright © 2018. All rights reserved.