public static final class Serializer.CompressionDeflateWrapper<E> extends Serializer<E> implements Serializable
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 int |
compressLevel |
protected byte[] |
dictionary |
protected Serializer<E> |
serializer |
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| Modifier | Constructor and Description |
|---|---|
|
Serializer.CompressionDeflateWrapper(Serializer<E> serializer) |
|
Serializer.CompressionDeflateWrapper(Serializer<E> serializer,
int compressLevel,
byte[] dictionary) |
protected |
Serializer.CompressionDeflateWrapper(SerializerBase serializerBase,
DataInput is,
SerializerBase.FastArrayList<Object> objectStack)
used for deserialization
|
| Modifier and Type | Method and Description |
|---|---|
E |
deserialize(DataInput in,
int available)
Deserialize the content of an object from a DataInput.
|
boolean |
equals(Object o) |
BTreeKeySerializer |
getBTreeKeySerializer(Comparator comparator) |
int |
hashCode() |
boolean |
isTrusted()
MapDB has relax record size boundary checking.
|
void |
serialize(DataOutput out,
E value)
Serialize the content of an object into a ObjectOutput
|
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) |
equals, fixedSize, hashCodeprotected final Serializer<E> serializer
protected final int compressLevel
protected final byte[] dictionary
public Serializer.CompressionDeflateWrapper(Serializer<E> serializer)
public Serializer.CompressionDeflateWrapper(Serializer<E> serializer, int compressLevel, byte[] dictionary)
protected Serializer.CompressionDeflateWrapper(SerializerBase serializerBase, DataInput is, SerializerBase.FastArrayList<Object> objectStack) throws IOException
IOExceptionpublic void serialize(DataOutput out, E value) throws IOException
Serializerserialize in class Serializer<E>out - ObjectOutput to save object intovalue - Object to serializeIOException - in case of IO errorpublic E deserialize(DataInput in, int available) throws IOException
Serializerdeserialize in class Serializer<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 - 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<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 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 BTreeKeySerializer getBTreeKeySerializer(Comparator comparator)
getBTreeKeySerializer in class Serializer<E>Copyright © 2015. All Rights Reserved.