Package com.influxdb.v3.client.internal
Class NanosecondConverter
java.lang.Object
com.influxdb.v3.client.internal.NanosecondConverter
Nanosecond converter.
 
Utility class converting epoch nanoseconds to epoch with a given precision.
- 
Method SummaryModifier and TypeMethodDescriptionstatic BigIntegerconvert(Instant instant, WritePrecision precision) ConvertInstanttimestamp to a given precision.static BigIntegerconvertToNanos(Number timestamp, WritePrecision precision) Convert timestamp in a given precision to nanoseconds.static BigIntegergetTimestampNano(Object value, org.apache.arrow.vector.types.pojo.Field field) Convert Long or LocalDateTime to timestamp nanosecond.
- 
Method Details- 
convertToNanos@Nullable public static BigInteger convertToNanos(@Nullable Number timestamp, WritePrecision precision) Convert timestamp in a given precision to nanoseconds.- Parameters:
- timestamp- epoch timestamp
- precision- precision
- Returns:
- epoch timestamp in precision, can be null
 
- 
convertConvertInstanttimestamp to a given precision.- Parameters:
- instant- Instant timestamp
- precision- precision
- Returns:
- epoch timestamp in precision
 
- 
getTimestampNano@Nullable public static BigInteger getTimestampNano(@Nonnull Object value, @Nonnull org.apache.arrow.vector.types.pojo.Field field) Convert Long or LocalDateTime to timestamp nanosecond.- Parameters:
- value- the time in Long or LocalDateTime
- field- the arrow field metadata
- Returns:
- the time in nanosecond
 
 
-