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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAddBooleanfield.AddDoublefield.AddLongfield.AddNumberfield.AddStringfield.Adds or replaces fields for this point.Adds or replaces a tag value for this point.Adds or replaces tags for this point.getTime()booleanHas point any fields?static Pointmeasurement(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
AddBooleanfield.- Parameters:
field- the field namevalue- the field value- Returns:
- this
-
addField
AddLongfield.- Parameters:
field- the field namevalue- the field value- Returns:
- this
-
addField
AddDoublefield.- Parameters:
field- the field namevalue- the field value- Returns:
- this
-
addField
AddNumberfield.- Parameters:
field- the field namevalue- the field value- Returns:
- this
-
addField
AddStringfield.- 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
-