Modifier and Type | Method and Description |
---|---|
Point.Builder |
addField(String field,
boolean value) |
Point.Builder |
addField(String field,
double value) |
Point.Builder |
addField(String field,
float value) |
Point.Builder |
addField(String field,
int value) |
Point.Builder |
addField(String field,
long value) |
Point.Builder |
addField(String field,
Number value) |
Point.Builder |
addField(String field,
short value) |
Point.Builder |
addField(String field,
String value) |
Point.Builder |
addFieldsFromPOJO(Object pojo)
Adds field map from object by reflection using
Column
annotation. |
Point |
build()
Create a new Point.
|
Point.Builder |
field(String field,
Object value)
Deprecated.
|
Point.Builder |
fields(Map<String,Object> fieldsToAdd)
Add a Map of fields to this point.
|
boolean |
hasFields()
Does this builder contain any fields?
|
Point.Builder |
tag(Map<String,String> tagsToAdd)
Add a Map of tags to add to this point.
|
Point.Builder |
tag(String tagName,
String value)
Add a tag to this point.
|
Point.Builder |
time(long timeToSet,
TimeUnit precisionToSet)
Add a time to this point as long.
|
Point.Builder |
time(Long timeToSet,
TimeUnit precisionToSet)
Add a time to this point as Long.
|
Point.Builder |
time(Number timeToSet,
TimeUnit precisionToSet)
Add a time to this point.
|
public Point.Builder tag(String tagName, String value)
tagName
- the tag namevalue
- the tag valuepublic Point.Builder tag(Map<String,String> tagsToAdd)
tagsToAdd
- the Map of tags to add@Deprecated public Point.Builder field(String field, Object value)
field
- the field namevalue
- the value of this fieldpublic Point.Builder addField(String field, boolean value)
public Point.Builder addField(String field, long value)
public Point.Builder addField(String field, double value)
public Point.Builder addField(String field, int value)
public Point.Builder addField(String field, float value)
public Point.Builder addField(String field, short value)
public Point.Builder addField(String field, Number value)
public Point.Builder addField(String field, String value)
public Point.Builder fields(Map<String,Object> fieldsToAdd)
fieldsToAdd
- the fields to addpublic Point.Builder time(Number timeToSet, TimeUnit precisionToSet)
timeToSet
- the time for this pointprecisionToSet
- the TimeUnitpublic Point.Builder time(long timeToSet, TimeUnit precisionToSet)
timeToSet
- the time for this point as longprecisionToSet
- the TimeUnitpublic Point.Builder time(Long timeToSet, TimeUnit precisionToSet)
timeToSet
- the time for this point as LongprecisionToSet
- the TimeUnitpublic boolean hasFields()
public Point.Builder addFieldsFromPOJO(Object pojo)
Column
annotation.pojo
- POJO Object with annotation Column
on fieldspublic Point build()
Copyright © 2022. All rights reserved.