public abstract class CollectionSerializer<T> extends java.lang.Object implements TypeSerializer<T>
Constructor and Description |
---|
CollectionSerializer() |
Modifier and Type | Method and Description |
---|---|
T |
deserialize(java.nio.ByteBuffer bytes) |
abstract T |
deserializeForNativeProtocol(java.nio.ByteBuffer buffer,
int version) |
protected abstract int |
getElementCount(T value) |
static java.nio.ByteBuffer |
pack(java.util.Collection<java.nio.ByteBuffer> buffers,
int elements,
int version) |
static int |
readCollectionSize(java.nio.ByteBuffer input,
int version) |
static java.nio.ByteBuffer |
readValue(java.nio.ByteBuffer input,
int version) |
java.nio.ByteBuffer |
serialize(T value) |
protected abstract java.util.List<java.nio.ByteBuffer> |
serializeValues(T value) |
protected static int |
sizeOfCollectionSize(int elements,
int version) |
static int |
sizeOfValue(java.nio.ByteBuffer value,
int version) |
void |
validate(java.nio.ByteBuffer bytes) |
abstract void |
validateForNativeProtocol(java.nio.ByteBuffer buffer,
int version) |
protected static void |
writeCollectionSize(java.nio.ByteBuffer output,
int elements,
int version) |
static void |
writeValue(java.nio.ByteBuffer output,
java.nio.ByteBuffer value,
int version) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getType, toCQLLiteral, toString
protected abstract java.util.List<java.nio.ByteBuffer> serializeValues(T value)
protected abstract int getElementCount(T value)
public abstract T deserializeForNativeProtocol(java.nio.ByteBuffer buffer, int version)
public abstract void validateForNativeProtocol(java.nio.ByteBuffer buffer, int version)
public java.nio.ByteBuffer serialize(T value)
serialize
in interface TypeSerializer<T>
public T deserialize(java.nio.ByteBuffer bytes)
deserialize
in interface TypeSerializer<T>
public void validate(java.nio.ByteBuffer bytes) throws MarshalException
validate
in interface TypeSerializer<T>
MarshalException
public static java.nio.ByteBuffer pack(java.util.Collection<java.nio.ByteBuffer> buffers, int elements, int version)
protected static void writeCollectionSize(java.nio.ByteBuffer output, int elements, int version)
public static int readCollectionSize(java.nio.ByteBuffer input, int version)
protected static int sizeOfCollectionSize(int elements, int version)
public static void writeValue(java.nio.ByteBuffer output, java.nio.ByteBuffer value, int version)
public static java.nio.ByteBuffer readValue(java.nio.ByteBuffer input, int version)
public static int sizeOfValue(java.nio.ByteBuffer value, int version)
Copyright © 2015 The Apache Software Foundation