org.mapdb
Class BTreeMap.NodeSerializer<A,B>

java.lang.Object
  extended by org.mapdb.BTreeMap.NodeSerializer<A,B>
All Implemented Interfaces:
Serializer<BTreeMap.BNode>
Enclosing class:
BTreeMap<K,V>

protected static class BTreeMap.NodeSerializer<A,B>
extends Object
implements Serializer<BTreeMap.BNode>


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.mapdb.Serializer
Serializer.CompressionWrapper<E>
 
Field Summary
protected  Comparator comparator
           
protected  boolean hasValues
           
protected  BTreeKeySerializer keySerializer
           
protected  int numberOfNodeMetas
           
protected  boolean valsOutsideNodes
           
protected  Serializer<Object> valueSerializer
           
 
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
 
Constructor Summary
BTreeMap.NodeSerializer(boolean valsOutsideNodes, BTreeKeySerializer keySerializer, Serializer valueSerializer, Comparator comparator, int numberOfNodeMetas)
           
 
Method Summary
 BTreeMap.BNode 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, BTreeMap.BNode value)
          Serialize the content of an object into a ObjectOutput
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

hasValues

protected final boolean hasValues

valsOutsideNodes

protected final boolean valsOutsideNodes

keySerializer

protected final BTreeKeySerializer keySerializer

valueSerializer

protected final Serializer<Object> valueSerializer

comparator

protected final Comparator comparator

numberOfNodeMetas

protected final int numberOfNodeMetas
Constructor Detail

BTreeMap.NodeSerializer

public BTreeMap.NodeSerializer(boolean valsOutsideNodes,
                               BTreeKeySerializer keySerializer,
                               Serializer valueSerializer,
                               Comparator comparator,
                               int numberOfNodeMetas)
Method Detail

serialize

public void serialize(DataOutput out,
                      BTreeMap.BNode value)
               throws IOException
Description copied from interface: Serializer
Serialize the content of an object into a ObjectOutput

Specified by:
serialize in interface Serializer<BTreeMap.BNode>
Parameters:
out - ObjectOutput to save object into
value - Object to serialize
Throws:
IOException

deserialize

public BTreeMap.BNode 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<BTreeMap.BNode>
Parameters:
in - to read serialized data from
available - 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<BTreeMap.BNode>
Returns:
fixed size or -1 for variable size


Copyright © 2014. All Rights Reserved.