protected static final class BTreeMap.NodeSerializer<A,B> extends Serializer<BTreeMap.BNode>
Serializer.Array<T>, Serializer.BooleanSer, Serializer.CompressionDeflateWrapper<E>, Serializer.CompressionWrapper<E>, Serializer.EightByteSerializer<E>, Serializer.FourByteSerializer<E>, Serializer.IntegerSerializer, Serializer.LongSerializer| Modifier and Type | Field and Description |
|---|---|
protected boolean |
hasValues |
protected BTreeKeySerializer |
keySerializer |
protected static int |
LEAF_MASK |
protected static int |
LEFT_MASK |
protected static int |
LEFT_SHIFT |
protected int |
numberOfNodeMetas |
protected static int |
RIGHT_MASK |
protected static int |
RIGHT_SHIFT |
protected static int |
SIZE_MASK |
protected boolean |
valsOutsideNodes |
protected Serializer<Object> |
valueSerializer |
BASIC, BIG_DECIMAL, BIG_INTEGER, BOOLEAN, BOOLEAN_ARRAY, BYTE, BYTE_ARRAY, BYTE_ARRAY_NOSIZE, CHAR, CHAR_ARRAY, CLASS, DATE, DOUBLE, DOUBLE_ARRAY, FLOAT, FLOAT_ARRAY, ILLEGAL_ACCESS, INT_ARRAY, INTEGER, INTEGER_PACKED, INTEGER_PACKED_ZIGZAG, JAVA, LONG, LONG_ARRAY, LONG_PACKED, LONG_PACKED_ZIGZAG, RECID, RECID_ARRAY, SHORT, SHORT_ARRAY, STRING, STRING_ASCII, STRING_INTERN, STRING_NOSIZE, STRING_XXHASH, UUID| Constructor and Description |
|---|
BTreeMap.NodeSerializer(boolean valsOutsideNodes,
BTreeKeySerializer keySerializer,
Serializer valueSerializer,
int numberOfNodeMetas) |
| Modifier and Type | Method and Description |
|---|---|
BTreeMap.BNode |
deserialize(DataInput in,
int available)
Deserialize the content of an object from a DataInput.
|
boolean |
isTrusted()
MapDB has relax record size boundary checking.
|
void |
serialize(DataOutput out,
BTreeMap.BNode value)
Serialize the content of an object into a ObjectOutput
|
protected void |
serializeChildArray(DataOutput out,
Object childArray) |
equals, fixedSize, getBTreeKeySerializer, hashCode, valueArrayCopyOfRange, valueArrayDeleteValue, valueArrayDeserialize, valueArrayEmpty, valueArrayFromArray, valueArrayGet, valueArrayPut, valueArraySerialize, valueArraySize, valueArrayUpdateValprotected static final int LEAF_MASK
protected static final int LEFT_SHIFT
protected static final int LEFT_MASK
protected static final int RIGHT_SHIFT
protected static final int RIGHT_MASK
protected static final int SIZE_MASK
protected final boolean hasValues
protected final boolean valsOutsideNodes
protected final BTreeKeySerializer keySerializer
protected final Serializer<Object> valueSerializer
protected final int numberOfNodeMetas
public BTreeMap.NodeSerializer(boolean valsOutsideNodes,
BTreeKeySerializer keySerializer,
Serializer valueSerializer,
int numberOfNodeMetas)
public void serialize(DataOutput out, BTreeMap.BNode value) throws IOException
Serializerserialize in class Serializer<BTreeMap.BNode>out - ObjectOutput to save object intovalue - Object to serializeIOException - in case of IO errorprotected void serializeChildArray(DataOutput out, Object childArray) throws IOException
IOExceptionpublic BTreeMap.BNode deserialize(DataInput in, int available) throws IOException
Serializerdeserialize in class Serializer<BTreeMap.BNode>in - to read serialized data fromavailable - how many bytes are available in DataInput for reading, may be -1 (in streams) or 0 (null).IOException - in case of IO errorpublic boolean isTrusted()
SerializerMapDB has relax record size boundary checking. It expect deserializer to read exactly as many bytes as were writen during serialization. If deserializer reads more bytes it might start reading others record data in store.
Some serializers (Kryo) have problems with this. To prevent this we can not read
data directly from store, but must copy them into separate byte[].
So zero copy optimalizations is disabled by default, and must be explicitly enabled here.
This flag indicates if this serializer was 'verified' to read as many bytes as it writes. It should be also much better tested etc.
isTrusted in class Serializer<BTreeMap.BNode>Copyright © 2015. All Rights Reserved.