protected static class Serializer.BooleanSer extends Serializer<Boolean>
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.BooleanSer() |
| Modifier and Type | Method and Description |
|---|---|
Boolean |
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.
|
boolean |
isTrusted()
MapDB has relax record size boundary checking.
|
void |
serialize(DataOutput out,
Boolean 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) |
Boolean |
valueArrayGet(Object vals,
int pos) |
Object |
valueArrayPut(Object vals,
int pos,
Boolean newValue) |
void |
valueArraySerialize(DataOutput out,
Object vals) |
int |
valueArraySize(Object vals) |
Object |
valueArrayUpdateVal(Object vals,
int pos,
Boolean newValue) |
equals, getBTreeKeySerializer, hashCodepublic void serialize(DataOutput out, Boolean value) throws IOException
Serializerserialize in class Serializer<Boolean>out - ObjectOutput to save object intovalue - Object to serializeIOException - in case of IO errorpublic Boolean deserialize(DataInput in, int available) throws IOException
Serializerdeserialize in class Serializer<Boolean>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 int fixedSize()
SerializerfixedSize in class Serializer<Boolean>public 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<Boolean>public void valueArraySerialize(DataOutput out, Object vals) throws IOException
valueArraySerialize in class Serializer<Boolean>IOExceptionpublic Object valueArrayDeserialize(DataInput in, int size) throws IOException
valueArrayDeserialize in class Serializer<Boolean>IOExceptionpublic Boolean valueArrayGet(Object vals, int pos)
valueArrayGet in class Serializer<Boolean>public int valueArraySize(Object vals)
valueArraySize in class Serializer<Boolean>public Object valueArrayEmpty()
valueArrayEmpty in class Serializer<Boolean>public Object valueArrayPut(Object vals, int pos, Boolean newValue)
valueArrayPut in class Serializer<Boolean>public Object valueArrayUpdateVal(Object vals, int pos, Boolean newValue)
valueArrayUpdateVal in class Serializer<Boolean>public Object valueArrayFromArray(Object[] objects)
valueArrayFromArray in class Serializer<Boolean>public Object valueArrayCopyOfRange(Object vals, int from, int to)
valueArrayCopyOfRange in class Serializer<Boolean>public Object valueArrayDeleteValue(Object vals, int pos)
valueArrayDeleteValue in class Serializer<Boolean>Copyright © 2015. All Rights Reserved.