protected static class Queues.SimpleQueue.NodeSerializer<E> extends java.lang.Object implements Serializer<Queues.SimpleQueue.Node<E>>
Serializer.CompressionWrapper<E>| Modifier and Type | Field and Description |
|---|---|
private Serializer<E> |
serializer |
BASIC, BOOLEAN, BYTE_ARRAY, BYTE_ARRAY_NOSIZE, CHAR_ARRAY, DOUBLE_ARRAY, ILLEGAL_ACCESS, INT_ARRAY, INTEGER, JAVA, LONG, LONG_ARRAY, STRING, STRING_ASCII, STRING_INTERN, STRING_NOSIZE, UUID| Constructor and Description |
|---|
NodeSerializer(Serializer<E> serializer) |
| Modifier and Type | Method and Description |
|---|---|
Queues.SimpleQueue.Node<E> |
deserialize(java.io.DataInput in,
int available)
Deserialize the content of an object from a DataInput.
|
int |
fixedSize()
Data could be serialized into record with variable size or fixed size.
|
void |
serialize(java.io.DataOutput out,
Queues.SimpleQueue.Node<E> value)
Serialize the content of an object into a ObjectOutput
|
private final Serializer<E> serializer
public NodeSerializer(Serializer<E> serializer)
public void serialize(java.io.DataOutput out,
Queues.SimpleQueue.Node<E> value)
throws java.io.IOException
Serializerserialize in interface Serializer<Queues.SimpleQueue.Node<E>>out - ObjectOutput to save object intovalue - Object to serializejava.io.IOExceptionpublic Queues.SimpleQueue.Node<E> deserialize(java.io.DataInput in, int available) throws java.io.IOException
Serializerdeserialize in interface Serializer<Queues.SimpleQueue.Node<E>>in - to read serialized data fromavailable - how many bytes are available in DataInput for reading, may be -1 (in streams) or 0 (null).java.io.IOExceptionpublic int fixedSize()
SerializerfixedSize in interface Serializer<Queues.SimpleQueue.Node<E>>