protected static class Queues.SimpleQueue.NodeSerializer<E> extends Object implements Serializer<Queues.SimpleQueue.Node<E>>
Serializer.CompressionWrapper<E>
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 |
---|
Queues.SimpleQueue.NodeSerializer(Serializer<E> serializer) |
Modifier and Type | Method and Description |
---|---|
Queues.SimpleQueue.Node<E> |
deserialize(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(DataOutput out,
Queues.SimpleQueue.Node<E> value)
Serialize the content of an object into a ObjectOutput
|
public Queues.SimpleQueue.NodeSerializer(Serializer<E> serializer)
public void serialize(DataOutput out, Queues.SimpleQueue.Node<E> value) throws IOException
Serializer
serialize
in interface Serializer<Queues.SimpleQueue.Node<E>>
out
- ObjectOutput to save object intovalue
- Object to serializeIOException
public Queues.SimpleQueue.Node<E> deserialize(DataInput in, int available) throws IOException
Serializer
deserialize
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).IOException
public int fixedSize()
Serializer
fixedSize
in interface Serializer<Queues.SimpleQueue.Node<E>>
Copyright © 2014. All Rights Reserved.