Modifier and Type | Method and Description |
---|---|
default Long |
decode(ByteBuffer bytes,
ProtocolVersion protocolVersion)
Decodes a value from the binary format of the CQL type handled by this codec.
|
long |
decodePrimitive(ByteBuffer value,
ProtocolVersion protocolVersion) |
default ByteBuffer |
encode(Long value,
ProtocolVersion protocolVersion)
Encodes the given value in the binary format of the CQL type handled by this codec.
|
ByteBuffer |
encodePrimitive(long value,
ProtocolVersion protocolVersion) |
accepts, accepts, accepts, accepts, format, getCqlType, getJavaType, parse
@Nullable ByteBuffer encodePrimitive(long value, @NonNull ProtocolVersion protocolVersion)
long decodePrimitive(@Nullable ByteBuffer value, @NonNull ProtocolVersion protocolVersion)
@Nullable default ByteBuffer encode(@Nullable Long value, @NonNull ProtocolVersion protocolVersion)
TypeCodec
null
input as the equivalent of an
empty collection.
@Nullable default Long decode(@Nullable ByteBuffer bytes, @NonNull ProtocolVersion protocolVersion)
TypeCodec
null
or a default value for the corresponding Java type, if
applicable;
null
; they should return
empty collections instead (the driver's default collection codecs all comply with this
rule);
ByteBuffer
should never be consumed by read operations that modify
its current position; if necessary, ByteBuffer.duplicate()
duplicate} it before
consuming.
Copyright © 2017–2020. All rights reserved.