T - The external type.public class WriteTimeCodec<T> extends ConvertingCodec<T,Long>
Write times are inserted using an USING TIMESTAMP clause and can be retrieved using
the WRITETIME function, as in writetime(mycol). Write times are always expressed
internally as bigints representing microseconds since the Unix Epoch.
internalCodec, javaType| Constructor and Description |
|---|
WriteTimeCodec(ConvertingCodec<T,Instant> innerCodec) |
| Modifier and Type | Method and Description |
|---|---|
Long |
externalToInternal(T value)
Converts the external representation of a value (i.e., the value, as produced by a connector)
to its internal representation (i.e., the Java type that matches the target CQL type).
|
T |
internalToExternal(Long value)
Converts the internal representation of a value (i.e., the Java type that matches the target
CQL type) to its external representation (i.e., the value, as consumed by a connector).
|
decode, encode, format, getCqlType, getInternalCodec, getInternalJavaType, getJavaType, parsepublic WriteTimeCodec(ConvertingCodec<T,Instant> innerCodec)
public Long externalToInternal(T value)
ConvertingCodecexternalToInternal in class ConvertingCodec<T,Long>value - the value's external form.public T internalToExternal(Long value)
ConvertingCodecinternalToExternal in class ConvertingCodec<T,Long>value - the value's internal form.Copyright © 2017–2021 DataStax. All rights reserved.