public static final class Serializer.Array<T> extends Serializer<T[]> 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 Serializer<T> |
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.Array(Serializer<T> serializer) |
protected |
Serializer.Array(SerializerBase serializerBase,
DataInput is,
SerializerBase.FastArrayList<Object> objectStack)
used for deserialization
|
| Modifier and Type | Method and Description |
|---|---|
T[] |
deserialize(DataInput in,
int available)
Deserialize the content of an object from a DataInput.
|
boolean |
equals(Object o) |
boolean |
equals(T[] a1,
T[] a2) |
int |
hashCode() |
int |
hashCode(T[] objects,
int seed) |
boolean |
isTrusted()
MapDB has relax record size boundary checking.
|
void |
serialize(DataOutput out,
T[] value)
Serialize the content of an object into a ObjectOutput
|
fixedSize, getBTreeKeySerializer, valueArrayCopyOfRange, valueArrayDeleteValue, valueArrayDeserialize, valueArrayEmpty, valueArrayFromArray, valueArrayGet, valueArrayPut, valueArraySerialize, valueArraySize, valueArrayUpdateValprotected final Serializer<T> serializer
public Serializer.Array(Serializer<T> serializer)
protected Serializer.Array(SerializerBase serializerBase, DataInput is, SerializerBase.FastArrayList<Object> objectStack) throws IOException
IOExceptionpublic void serialize(DataOutput out, T[] value) throws IOException
Serializerserialize in class Serializer<T[]>out - ObjectOutput to save object intovalue - Object to serializeIOException - in case of IO errorpublic T[] deserialize(DataInput in, int available) throws IOException
Serializerdeserialize in class Serializer<T[]>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<T[]>public boolean equals(T[] a1, T[] a2)
equals in class Serializer<T[]>public int hashCode(T[] objects, int seed)
hashCode in class Serializer<T[]>Copyright © 2015. All Rights Reserved.