protected abstract static class Serializer.EightByteSerializer<E> extends Serializer<E>
Serializer.Array<T>, Serializer.BooleanSer, Serializer.CompressionDeflateWrapper<E>, Serializer.CompressionWrapper<E>, Serializer.EightByteSerializer<E>, Serializer.FourByteSerializer<E>, Serializer.IntegerSerializer, Serializer.LongSerializerBASIC, 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| Modifier | Constructor and Description |
|---|---|
protected |
Serializer.EightByteSerializer() |
| Modifier and Type | Method and Description |
|---|---|
int |
fixedSize()
Data could be serialized into record with variable size or fixed size.
|
boolean |
isTrusted()
MapDB has relax record size boundary checking.
|
protected abstract long |
pack(E l) |
protected abstract E |
unpack(long l) |
Object |
valueArrayCopyOfRange(Object vals,
int from,
int to) |
Object |
valueArrayDeleteValue(Object vals,
int pos) |
Object |
valueArrayDeserialize(DataInput in,
int size) |
Object |
valueArrayEmpty() |
Object |
valueArrayFromArray(Object[] objects) |
E |
valueArrayGet(Object vals,
int pos) |
Object |
valueArrayPut(Object vals,
int pos,
E newValue) |
void |
valueArraySerialize(DataOutput out,
Object vals) |
int |
valueArraySize(Object vals) |
Object |
valueArrayUpdateVal(Object vals,
int pos,
E newValue) |
deserialize, equals, getBTreeKeySerializer, hashCode, serializeprotected abstract E unpack(long l)
protected abstract long pack(E l)
public E valueArrayGet(Object vals, int pos)
valueArrayGet in class Serializer<E>public int valueArraySize(Object vals)
valueArraySize in class Serializer<E>public Object valueArrayEmpty()
valueArrayEmpty in class Serializer<E>public Object valueArrayPut(Object vals, int pos, E newValue)
valueArrayPut in class Serializer<E>public Object valueArrayUpdateVal(Object vals, int pos, E newValue)
valueArrayUpdateVal in class Serializer<E>public Object valueArrayFromArray(Object[] objects)
valueArrayFromArray in class Serializer<E>public Object valueArrayCopyOfRange(Object vals, int from, int to)
valueArrayCopyOfRange in class Serializer<E>public Object valueArrayDeleteValue(Object vals, int pos)
valueArrayDeleteValue in class Serializer<E>public void valueArraySerialize(DataOutput out, Object vals) throws IOException
valueArraySerialize in class Serializer<E>IOExceptionpublic Object valueArrayDeserialize(DataInput in, int size) throws IOException
valueArrayDeserialize in class Serializer<E>IOExceptionpublic 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<E>public int fixedSize()
SerializerfixedSize in class Serializer<E>Copyright © 2015. All Rights Reserved.