Package org.opends.server.types
Class EntryEncodeConfig
- java.lang.Object
-
- org.opends.server.types.EntryEncodeConfig
-
@PublicAPI(stability=VOLATILE, mayInstantiate=true, mayExtend=false, mayInvoke=true) public final class EntryEncodeConfig extends Object
This class defines a data structure that contains configuration information about how an entry should be encoded.
-
-
Field Summary
Fields Modifier and Type Field Description static EntryEncodeConfigDEFAULT_CONFIGA reference to an entry encode configuration with all the default settings.
-
Constructor Summary
Constructors Constructor Description EntryEncodeConfig()Creates a new encoded entry configuration with the default settings.EntryEncodeConfig(boolean excludeDN, boolean compressAttrDescriptions, boolean compressObjectClassSets)Creates a new encoded entry configuration with the specified settings.EntryEncodeConfig(boolean excludeDN, boolean compressAttrDescriptions, boolean compressObjectClassSets, CompressedSchema compressedSchema)Creates a new encoded entry configuration with the specified settings.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancompressAttributeDescriptions()Indicates whether the encoded entry should use compressed attribute descriptions.booleancompressObjectClassSets()Indicates whether the encoded entry should use compressed object class sets.static EntryEncodeConfigdecode(ByteSequenceReader buffer, int length, CompressedSchema compressedSchema)Decodes the entry encode configuration from current position and length of the given byte array.voidencode(ByteStringBuilder buffer)Encodes this entry encode configuration into a byte array suitable for inclusion in the encoded entry.booleanexcludeDN()Indicates whether the encoded entry should exclude the DN.CompressedSchemagetCompressedSchema()Retrieves the compressed schema manager that may be used to generate compact schema encodings with this entry encode configuration.StringtoString()voidtoString(StringBuilder buffer)Appends a string representation of this entry encode configuration to the provided buffer.
-
-
-
Field Detail
-
DEFAULT_CONFIG
public static final EntryEncodeConfig DEFAULT_CONFIG
A reference to an entry encode configuration with all the default settings.
-
-
Constructor Detail
-
EntryEncodeConfig
public EntryEncodeConfig()
Creates a new encoded entry configuration with the default settings.
-
EntryEncodeConfig
public EntryEncodeConfig(boolean excludeDN, boolean compressAttrDescriptions, boolean compressObjectClassSets)Creates a new encoded entry configuration with the specified settings.- Parameters:
excludeDN- Indicates whether to exclude the DN from the encoded entry.compressAttrDescriptions- Indicates whether to compress attribute descriptions.compressObjectClassSets- Indicates whether to compress object class sets.
-
EntryEncodeConfig
public EntryEncodeConfig(boolean excludeDN, boolean compressAttrDescriptions, boolean compressObjectClassSets, CompressedSchema compressedSchema)Creates a new encoded entry configuration with the specified settings.- Parameters:
excludeDN- Indicates whether to exclude the DN from the encoded entry.compressAttrDescriptions- Indicates whether to compress attribute descriptions.compressObjectClassSets- Indicates whether to compress object class sets.compressedSchema- The compressed schema manager for this encode config.
-
-
Method Detail
-
excludeDN
public boolean excludeDN()
Indicates whether the encoded entry should exclude the DN.- Returns:
trueif the encoded entry should exclude the DN, orfalseif not.
-
compressAttributeDescriptions
public boolean compressAttributeDescriptions()
Indicates whether the encoded entry should use compressed attribute descriptions.- Returns:
trueif the encoded entry should use compressed attribute descriptions, orfalseif not.
-
compressObjectClassSets
public boolean compressObjectClassSets()
Indicates whether the encoded entry should use compressed object class sets.- Returns:
trueif the encoded entry should use compressed object class sets, orfalseif not.
-
getCompressedSchema
public CompressedSchema getCompressedSchema()
Retrieves the compressed schema manager that may be used to generate compact schema encodings with this entry encode configuration.- Returns:
- The compressed schema manager that may be used to generate compact schema encodings with this entry encode configuration.
-
encode
public void encode(ByteStringBuilder buffer)
Encodes this entry encode configuration into a byte array suitable for inclusion in the encoded entry.- Parameters:
buffer- The buffer to encode this configuration to.
-
decode
public static EntryEncodeConfig decode(ByteSequenceReader buffer, int length, CompressedSchema compressedSchema) throws DirectoryException
Decodes the entry encode configuration from current position and length of the given byte array.- Parameters:
buffer- The byte array containing the encoded entry.length- The number of bytes contained in the encode configuration.compressedSchema- The compressed schema manager to use when decoding.- Returns:
- The decoded configuration.
- Throws:
DirectoryException- If the configuration cannot be properly decoded.
-
toString
public void toString(StringBuilder buffer)
Appends a string representation of this entry encode configuration to the provided buffer.- Parameters:
buffer- The buffer to which the information should be appended.
-
-