Package org.influxdb.dto
Class Point
java.lang.Object
org.influxdb.dto.Point
public class Point extends Object
Representation of a InfluxDB database Point.
- Author:
- stefan.majer [at] gmail.com
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Point.Builder
Builder for a new Point. -
Method Summary
Modifier and Type Method Description boolean
equals(Object o)
int
hashCode()
String
lineProtocol()
Calculate the lineprotocol entry for a single Point.String
lineProtocol(TimeUnit precision)
Calculate the lineprotocol entry for a single point, using a specificTimeUnit
for the timestamp.static Point.Builder
measurement(String measurement)
Create a new Point Build build to create a new Point in a fluent manner.static Point.Builder
measurementByPOJO(Class<?> clazz)
Create a new Point Build build to create a new Point in a fluent manner from a POJO.String
toString()
-
Method Details
-
measurement
Create a new Point Build build to create a new Point in a fluent manner.- Parameters:
measurement
- the name of the measurement.- Returns:
- the Builder to be able to add further Builder calls.
-
measurementByPOJO
Create a new Point Build build to create a new Point in a fluent manner from a POJO.- Parameters:
clazz
- Class of the POJO- Returns:
- the Builder instance
-
equals
-
hashCode
public int hashCode() -
toString
-
lineProtocol
Calculate the lineprotocol entry for a single Point.NaN and infinity values are silently dropped as they are unsupported: https://github.com/influxdata/influxdb/issues/4089
- Returns:
- the String without newLine, empty when there are no fields to write
- See Also:
- InfluxDB line protocol reference
-
lineProtocol
Calculate the lineprotocol entry for a single point, using a specificTimeUnit
for the timestamp.NaN and infinity values are silently dropped as they are unsupported: https://github.com/influxdata/influxdb/issues/4089
- Parameters:
precision
- the time precision unit for this point- Returns:
- the String without newLine, empty when there are no fields to write
- See Also:
- InfluxDB line protocol reference
-