Package com.influxdb.client.write
Class Point
java.lang.Object
com.influxdb.client.write.Point
Point defines the values that will be written to the database.
See Go Implementation.
- Author:
- Jakub Bednar (bednar@github) (11/10/2018 11:40)
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionAddBoolean
field.AddDouble
field.AddLong
field.AddNumber
field.AddString
field.Adds or replaces fields for this point.Adds or replaces a tag value for this point.Adds or replaces tags for this point.getTime()
boolean
Has point any fields?static Point
measurement
(String measurementName) Create a new Point withe specified a measurement name.time
(Long time, WritePrecision precision) Updates the timestamp for the point.time
(Number time, WritePrecision precision) Updates the timestamp for the point.time
(Instant time, WritePrecision precision) Updates the timestamp for the point.toLineProtocol
(PointSettings pointSettings) toLineProtocol
(PointSettings pointSettings, WritePrecision precision)
-
Constructor Details
-
Point
Create a new Point with specified a measurement name.- Parameters:
measurementName
- the measurement name
-
-
Method Details
-
measurement
Create a new Point withe specified a measurement name.- Parameters:
measurementName
- the measurement name- Returns:
- new instance of
Point
-
addTag
Adds or replaces a tag value for this point.- Parameters:
key
- the tag namevalue
- the tag value- Returns:
- this
-
addTags
Adds or replaces tags for this point.- Parameters:
tagsToAdd
- the Map of tags to add- Returns:
- this
-
addField
AddBoolean
field.- Parameters:
field
- the field namevalue
- the field value- Returns:
- this
-
addField
AddLong
field.- Parameters:
field
- the field namevalue
- the field value- Returns:
- this
-
addField
AddDouble
field.- Parameters:
field
- the field namevalue
- the field value- Returns:
- this
-
addField
AddNumber
field.- Parameters:
field
- the field namevalue
- the field value- Returns:
- this
-
addField
AddString
field.- Parameters:
field
- the field namevalue
- the field value- Returns:
- this
-
addFields
Adds or replaces fields for this point.- Parameters:
fieldsToAdd
- the Map of fields to add- Returns:
- this
-
time
Updates the timestamp for the point.- Parameters:
time
- the timestampprecision
- the timestamp precision- Returns:
- this
-
time
Updates the timestamp for the point.- Parameters:
time
- the timestampprecision
- the timestamp precision- Returns:
- this
-
time
Updates the timestamp for the point.- Parameters:
time
- the timestampprecision
- the timestamp precision- Returns:
- this
-
getTime
- Returns:
- the data point timestamp
-
getPrecision
- Returns:
- the data point precision
-
hasFields
public boolean hasFields()Has point any fields?- Returns:
- true, if the point contains any fields, false otherwise.
-
toLineProtocol
- Returns:
- Line Protocol
-
toLineProtocol
- Parameters:
pointSettings
- with the default values- Returns:
- Line Protocol
-
toLineProtocol
@Nonnull public String toLineProtocol(@Nullable PointSettings pointSettings, @Nonnull WritePrecision precision) - Parameters:
pointSettings
- with the default valuesprecision
- required precision- Returns:
- Line Protocol
-