org.mapdb
Class Queues.SimpleQueue.NodeSerializer<E>
java.lang.Object
org.mapdb.Queues.SimpleQueue.NodeSerializer<E>
- All Implemented Interfaces:
- Serializer<Queues.SimpleQueue.Node<E>>
- Enclosing class:
- Queues.SimpleQueue<E>
protected static class Queues.SimpleQueue.NodeSerializer<E>
- extends Object
- implements Serializer<Queues.SimpleQueue.Node<E>>
| Fields inherited from interface org.mapdb.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 |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Queues.SimpleQueue.NodeSerializer
public Queues.SimpleQueue.NodeSerializer(Serializer<E> serializer)
serialize
public void serialize(DataOutput out,
Queues.SimpleQueue.Node<E> value)
throws IOException
- Description copied from interface:
Serializer
- Serialize the content of an object into a ObjectOutput
- Specified by:
serialize in interface Serializer<Queues.SimpleQueue.Node<E>>
- Parameters:
out - ObjectOutput to save object intovalue - Object to serialize
- Throws:
IOException
deserialize
public Queues.SimpleQueue.Node<E> deserialize(DataInput in,
int available)
throws IOException
- Description copied from interface:
Serializer
- Deserialize the content of an object from a DataInput.
- Specified by:
deserialize in interface Serializer<Queues.SimpleQueue.Node<E>>
- Parameters:
in - to read serialized data fromavailable - how many bytes are available in DataInput for reading, may be -1 (in streams) or 0 (null).
- Returns:
- deserialized object
- Throws:
IOException
fixedSize
public int fixedSize()
- Description copied from interface:
Serializer
- Data could be serialized into record with variable size or fixed size.
Some optimizations can be applied to serializers with fixed size
- Specified by:
fixedSize in interface Serializer<Queues.SimpleQueue.Node<E>>
- Returns:
- fixed size or -1 for variable size
Copyright © 2014. All Rights Reserved.