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
  • Method Details

    • measurement

      public static Point.Builder measurement​(String 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

      public static Point.Builder measurementByPOJO​(Class<?> clazz)
      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

      public boolean equals​(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • lineProtocol

      public String 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

      public String lineProtocol​(TimeUnit precision)
      Calculate the lineprotocol entry for a single point, using a specific TimeUnit 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