public class ID2Entry extends DatabaseContainer
dbConfig, entryContainer, name
Modifier and Type | Method and Description |
---|---|
static Entry |
entryFromDatabase(org.forgerock.opendj.ldap.ByteString bytes,
CompressedSchema compressedSchema)
Decodes an entry from its database representation.
|
Entry |
get(com.sleepycat.je.Transaction txn,
EntryID id,
com.sleepycat.je.LockMode lockMode)
Fetch a record from the entry database.
|
boolean |
put(com.sleepycat.je.Transaction txn,
EntryID id,
Entry entry)
Write a record in the entry database.
|
void |
setDataConfig(DataConfig dataConfig)
Set the desired compression and encryption options for data
stored in the entry database.
|
close, getName, getRecordCount, open, openCursor, openCursor, preload, toString
public static Entry entryFromDatabase(org.forgerock.opendj.ldap.ByteString bytes, CompressedSchema compressedSchema) throws DirectoryException, org.forgerock.opendj.ldap.DecodeException, LDAPException, DataFormatException, IOException
An entry on disk is ASN1 encoded in this format:
DatabaseEntry ::= [APPLICATION 0] IMPLICIT SEQUENCE { uncompressedSize INTEGER, -- A zero value means not compressed. dataBytes OCTET STRING -- Optionally compressed encoding of the data bytes. } ID2EntryValue ::= DatabaseEntry -- Where dataBytes contains an encoding of DirectoryServerEntry. DirectoryServerEntry ::= [APPLICATION 1] IMPLICIT SEQUENCE { dn LDAPDN, objectClasses SET OF LDAPString, userAttributes AttributeList, operationalAttributes AttributeList }
bytes
- A byte array containing the encoded database value.compressedSchema
- The compressed schema manager to use when decoding.org.forgerock.opendj.ldap.DecodeException
- If the data is not in the expected ASN.1 encoding
format.LDAPException
- If the data is not in the expected ASN.1 encoding
format.DataFormatException
- If an error occurs while trying to decompress
compressed data.DirectoryException
- If a Directory Server error occurs.IOException
- if an error occurs while reading the ASN1 sequence.public boolean put(com.sleepycat.je.Transaction txn, EntryID id, Entry entry) throws com.sleepycat.je.DatabaseException, DirectoryException
txn
- The database transaction or null if none.id
- The entry ID which forms the key.entry
- The LDAP entry.com.sleepycat.je.DatabaseException
- If an error occurs in the JE database.DirectoryException
- If a problem occurs while attempting to encode
the entry.public Entry get(com.sleepycat.je.Transaction txn, EntryID id, com.sleepycat.je.LockMode lockMode) throws DirectoryException, com.sleepycat.je.DatabaseException
txn
- The database transaction or null if none.id
- The desired entry ID which forms the key.lockMode
- The JE locking mode to be used for the read.DirectoryException
- If a problem occurs while getting the entry.com.sleepycat.je.DatabaseException
- If an error occurs in the JE database.public void setDataConfig(DataConfig dataConfig)
dataConfig
- The desired compression and encryption options for data
stored in the entry database.Copyright © 2010-2015 ForgeRock AS. All Rights Reserved.