public class MavibotEntrySerializer
extends org.apache.directory.mavibot.btree.serializer.AbstractElementSerializer<org.apache.directory.api.ldap.model.entry.Entry>
| Modifier and Type | Class and Description |
|---|---|
private static class |
MavibotEntrySerializer.EntryComparator |
| Modifier and Type | Field and Description |
|---|---|
private static java.util.Comparator<org.apache.directory.api.ldap.model.entry.Entry> |
comparator |
private static boolean |
IS_DEBUG
Speedup for logs
|
private static org.slf4j.Logger |
LOG
the logger for this class
|
private static org.apache.directory.api.ldap.model.schema.SchemaManager |
schemaManager
The schemaManager reference
|
private static long |
serialVersionUID
The serialVersionUID
|
| Constructor and Description |
|---|
MavibotEntrySerializer()
Creates a new instance of ServerEntrySerializer.
|
| Modifier and Type | Method and Description |
|---|---|
org.apache.directory.api.ldap.model.entry.Entry |
deserialize(org.apache.directory.mavibot.btree.serializer.BufferHandler bufferHandler) |
org.apache.directory.api.ldap.model.entry.Entry |
deserialize(java.nio.ByteBuffer buffer)
Deserialize a Entry.
|
org.apache.directory.api.ldap.model.entry.Entry |
fromBytes(byte[] buffer) |
org.apache.directory.api.ldap.model.entry.Entry |
fromBytes(byte[] buffer,
int pos) |
java.util.Comparator<org.apache.directory.api.ldap.model.entry.Entry> |
getComparator() |
java.lang.Class<?> |
getType() |
byte[] |
serialize(org.apache.directory.api.ldap.model.entry.Entry entry)
This is the place where we serialize entries, and all theirs
elements.
|
static void |
setSchemaManager(org.apache.directory.api.ldap.model.schema.SchemaManager schemaManager) |
private static final long serialVersionUID
private static final org.slf4j.Logger LOG
private static final boolean IS_DEBUG
private static org.apache.directory.api.ldap.model.schema.SchemaManager schemaManager
private static java.util.Comparator<org.apache.directory.api.ldap.model.entry.Entry> comparator
public MavibotEntrySerializer()
setSchemaManager(SchemaManager)public java.util.Comparator<org.apache.directory.api.ldap.model.entry.Entry> getComparator()
getComparator in interface org.apache.directory.mavibot.btree.serializer.ElementSerializer<org.apache.directory.api.ldap.model.entry.Entry>getComparator in class org.apache.directory.mavibot.btree.serializer.AbstractElementSerializer<org.apache.directory.api.ldap.model.entry.Entry>public byte[] serialize(org.apache.directory.api.ldap.model.entry.Entry entry)
This is the place where we serialize entries, and all theirs
elements. the reason why we don't call the underlying methods
(ServerAttribute.write(), Value.write()) is that we need
access to the registries to read back the values.
The structure used to store the entry is the following :
public org.apache.directory.api.ldap.model.entry.Entry deserialize(java.nio.ByteBuffer buffer)
throws java.io.IOException
bytes - the byte array containing the serialized entryjava.io.IOException - if we can't deserialize the Entrypublic org.apache.directory.api.ldap.model.entry.Entry deserialize(org.apache.directory.mavibot.btree.serializer.BufferHandler bufferHandler)
throws java.io.IOException
java.io.IOExceptionpublic static void setSchemaManager(org.apache.directory.api.ldap.model.schema.SchemaManager schemaManager)
public org.apache.directory.api.ldap.model.entry.Entry fromBytes(byte[] buffer)
throws java.io.IOException
java.io.IOExceptionpublic org.apache.directory.api.ldap.model.entry.Entry fromBytes(byte[] buffer,
int pos)
throws java.io.IOException
java.io.IOExceptionpublic java.lang.Class<?> getType()
getType in interface org.apache.directory.mavibot.btree.serializer.ElementSerializer<org.apache.directory.api.ldap.model.entry.Entry>getType in class org.apache.directory.mavibot.btree.serializer.AbstractElementSerializer<org.apache.directory.api.ldap.model.entry.Entry>