Class LocalDateTimeMapper
java.lang.Object
com.aerospike.mapper.tools.TypeMapper
com.aerospike.mapper.tools.mappers.LocalDateTimeMapper
Map a java.time.LocalDateTime to Aerospike.
If we store the data in a single long we can only store to the millisecond
precision, like:
return Date.from(((LocalDateTime) value).toInstant(ZoneOffset.UTC)).getTime();Whereas LocalDateTime can store down to the nanosecond precision. To store this properly we will split it into date and time components and store both in a list.
- Author:
- tfaulkes
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfromAerospikeFormat
(Object value) toAerospikeFormat
(Object value) Methods inherited from class com.aerospike.mapper.tools.TypeMapper
toAerospikeFormat
-
Constructor Details
-
LocalDateTimeMapper
public LocalDateTimeMapper()
-
-
Method Details
-
toAerospikeFormat
- Specified by:
toAerospikeFormat
in classTypeMapper
-
fromAerospikeFormat
- Specified by:
fromAerospikeFormat
in classTypeMapper
-