@NotThreadSafe public final class Point extends Object
Constructor and Description |
---|
Point() |
Modifier and Type | Method and Description |
---|---|
Point |
addField(String field,
boolean value)
Add
Boolean field. |
Point |
addField(String field,
double value)
Add
Double field. |
Point |
addField(String field,
long value)
Add
Long field. |
Point |
addField(String field,
Number value)
Add
Number field. |
Point |
addField(String field,
String value)
Add
Boolean field. |
Point |
addTag(String key,
String value)
Adds or replaces a tag value for a point.
|
WritePrecision |
getPrecision() |
boolean |
hasFields()
Has point any fields?
|
static Point |
measurement(String measurementName)
Create a new Point withe specified a measurement name.
|
Point |
time(Instant time,
WritePrecision precision)
Updates the timestamp for the point.
|
Point |
time(Long time,
WritePrecision precision)
Updates the timestamp for the point.
|
String |
toLineProtocol() |
String |
toLineProtocol(PointSettings pointSettings) |
@Nonnull public static Point measurement(@Nonnull String measurementName)
measurementName
- the measurement namePoint
@Nonnull public Point addTag(@Nonnull String key, @Nullable String value)
key
- the tag namevalue
- the tag value@Nonnull public Point addField(@Nonnull String field, boolean value)
Boolean
field.field
- the field namevalue
- the field valuepublic Point addField(@Nonnull String field, long value)
Long
field.field
- the field namevalue
- the field value@Nonnull public Point addField(@Nonnull String field, double value)
Double
field.field
- the field namevalue
- the field value@Nonnull public Point addField(@Nonnull String field, @Nullable Number value)
Number
field.field
- the field namevalue
- the field value@Nonnull public Point addField(@Nonnull String field, @Nullable String value)
Boolean
field.field
- the field namevalue
- the field value@Nonnull public Point time(@Nullable Instant time, @Nonnull WritePrecision precision)
time
- the timestampprecision
- the timestamp precision@Nonnull public Point time(@Nullable Long time, @Nonnull WritePrecision precision)
time
- the timestampprecision
- the timestamp precision@Nonnull public WritePrecision getPrecision()
public boolean hasFields()
@Nonnull public String toLineProtocol(@Nullable PointSettings pointSettings)
pointSettings
- with the default valuesCopyright © 2018–2020 InfluxData, Inc.. All rights reserved.