|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.opends.server.backends.jeb.EntryContainer
public class EntryContainer
Storage container for LDAP entries. Each base DN of a JE backend is given its own entry container. The entry container is the object that implements the guts of the backend API methods for LDAP operations.
Nested Class Summary | |
---|---|
class |
EntryContainer.AttributeJEIndexCfgManager
This class is responsible for managing the configuraiton for attribute indexes used within this entry container. |
static class |
EntryContainer.KeyReverseComparator
A lexicographic byte array comparator that compares in reverse byte order. |
class |
EntryContainer.VLVJEIndexCfgManager
This class is responsible for managing the configuraiton for VLV indexes used within this entry container. |
Field Summary | |
---|---|
static java.lang.String |
ATTR_DEBUG_SEARCH_INDEX
The attribute used to return a search index debug string to the client. |
EntryContainer.AttributeJEIndexCfgManager |
attributeJEIndexCfgManager
The attribute index configuration manager. |
static java.lang.String |
DN2ID_DATABASE_NAME
The name of the DN database. |
static java.lang.String |
ID2CHILDREN_DATABASE_NAME
The name of the children index database. |
static java.lang.String |
ID2ENTRY_DATABASE_NAME
The name of the entry database. |
static java.lang.String |
ID2SUBTREE_DATABASE_NAME
The name of the subtree index database. |
static java.lang.String |
REFERRAL_DATABASE_NAME
The name of the referral database. |
static java.lang.String |
STATE_DATABASE_NAME
The name of the state database. |
EntryContainer.VLVJEIndexCfgManager |
vlvJEIndexCfgManager
The vlv index configuration manager. |
Constructor Summary | |
---|---|
EntryContainer(DN baseDN,
java.lang.String databasePrefix,
Backend backend,
LocalDBBackendCfg config,
com.sleepycat.je.Environment env,
RootContainer rootContainer)
Create a new entry entryContainer object. |
Method Summary | |
---|---|
void |
addEntry(Entry entry,
AddOperation addOperation)
Adds the provided entry to this database. |
ConfigChangeResult |
applyConfigurationChange(LocalDBBackendCfg cfg)
Applies the configuration changes to this change listener. |
com.sleepycat.je.Transaction |
beginTransaction()
Begin a leaf transaction using the default configuration. |
long |
clear()
Clear the contents of this entry container. |
long |
clearAttributeIndex(AttributeIndex index)
Clear the contents for a attribute index from disk. |
long |
clearDatabase(DatabaseContainer database)
Clear the contents for a database from disk. |
void |
close()
Closes the entry entryContainer. |
void |
delete()
Delete this entry container from disk. |
void |
deleteAttributeIndex(AttributeIndex index)
Removes a attribute index from disk. |
void |
deleteDatabase(DatabaseContainer database)
Remove a database from disk. |
void |
deleteEntry(DN entryDN,
DeleteOperation deleteOperation)
Removes the specified entry from this database. |
boolean |
entryExists(DN entryDN)
Indicates whether an entry with the specified DN exists. |
AttributeIndex |
getAttributeIndex(AttributeType attrType)
Look for an attribute index for the given attribute type. |
java.util.Collection<AttributeIndex> |
getAttributeIndexes()
Retrieve all attribute indexes. |
java.util.Map<AttributeType,AttributeIndex> |
getAttributeIndexMap()
Return attribute index map. |
DN |
getBaseDN()
Get the baseDN this entry container is responsible for. |
java.lang.String |
getDatabasePrefix()
This method constructs a container name from a base DN. |
DN2ID |
getDN2ID()
Get the DN database used by this entry entryContainer. |
DN2URI |
getDN2URI()
Get the referral database used by this entry entryContainer. |
Entry |
getEntry(DN entryDN)
Fetch an entry by DN, trying the entry cache first, then the database. |
long |
getEntryCount()
Get a count of the number of entries stored in this entry entryContainer. |
int |
getEntryLimitExceededCount()
Get the number of values for which the entry limit has been exceeded since the entry entryContainer was opened. |
com.sleepycat.je.EnvironmentConfig |
getEnvironmentConfig()
Get the environment config of the JE environment used in this entry container. |
EntryID |
getHighestEntryID()
Determine the highest entryID in the entryContainer. |
Index |
getID2Children()
Get the children database used by this entry entryContainer. |
ID2Entry |
getID2Entry()
Get the entry database used by this entry entryContainer. |
Index |
getID2Subtree()
Get the subtree database used by this entry entryContainer. |
long |
getNumSubordinates(DN entryDN,
boolean subtree)
Determine the number of subordinate entries for a given entry. |
DN |
getParentWithinBase(DN dn)
Get the parent of a DN in the scope of the base DN. |
RootContainer |
getRootContainer()
Retrieves a reference to the root container in which this entry container exists. |
State |
getState()
Get the state database used by this entry container. |
int |
getSubtreeDeleteBatchSize()
Get the subtree delete batch size. |
VLVIndex |
getVLVIndex(java.lang.String vlvIndexName)
Look for an VLV index for the given index name. |
java.util.Collection<VLVIndex> |
getVLVIndexes()
Retrieve all VLV indexes. |
boolean |
isConfigurationChangeAcceptable(LocalDBBackendCfg cfg,
java.util.List<Message> unacceptableReasons)
Indicates whether the proposed change to the configuration is acceptable to this change listener. |
static boolean |
isManageDsaITOperation(Operation operation)
Determine whether the provided operation has the ManageDsaIT request control. |
void |
listDatabases(java.util.List<DatabaseContainer> dbList)
Get a list of the databases opened by this entryContainer. |
void |
lock()
Get the exclusive lock. |
static DN |
modDN(DN oldDN,
int oldSuffixLen,
DN newSuffixDN)
Make a new DN for a subordinate entry of a renamed or moved entry. |
void |
open()
Opens the entryContainer for reading and writing. |
void |
renameEntry(DN currentDN,
Entry entry,
ModifyDNOperation modifyDNOperation)
Moves and/or renames the provided entry in this backend, altering any subordinate entries as necessary. |
void |
replaceEntry(Entry entry,
ModifyOperation modifyOperation)
The simplest case of replacing an entry in which the entry DN has not changed. |
void |
search(SearchOperation searchOperation)
Processes the specified search in this entryContainer. |
void |
setDatabasePrefix(java.lang.String newDatabasePrefix)
Sets a new database prefix for this entry container and rename all existing databases in use by this entry container. |
static void |
transactionAbort(com.sleepycat.je.Transaction txn)
Abort a transaction. |
static void |
transactionCommit(com.sleepycat.je.Transaction txn)
Commit a transaction. |
void |
unlock()
Unlock the exclusive lock. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String ID2ENTRY_DATABASE_NAME
public static final java.lang.String DN2ID_DATABASE_NAME
public static final java.lang.String ID2CHILDREN_DATABASE_NAME
public static final java.lang.String ID2SUBTREE_DATABASE_NAME
public static final java.lang.String REFERRAL_DATABASE_NAME
public static final java.lang.String STATE_DATABASE_NAME
public static final java.lang.String ATTR_DEBUG_SEARCH_INDEX
public EntryContainer.AttributeJEIndexCfgManager attributeJEIndexCfgManager
public EntryContainer.VLVJEIndexCfgManager vlvJEIndexCfgManager
Constructor Detail |
---|
public EntryContainer(DN baseDN, java.lang.String databasePrefix, Backend backend, LocalDBBackendCfg config, com.sleepycat.je.Environment env, RootContainer rootContainer) throws ConfigException
baseDN
- The baseDN this entry container will be responsible for
storing on disk.databasePrefix
- The prefix to use in the database names used by
this entry container.backend
- A reference to the JE backend that is creating this entry
container. It is needed by the Directory Server entry cache
methods.config
- The configuration of the JE backend.env
- The JE environment to create this entryContainer in.rootContainer
- The root container this entry container is in.
ConfigException
- if a configuration related error occurs.Method Detail |
---|
public void open() throws com.sleepycat.je.DatabaseException, ConfigException
com.sleepycat.je.DatabaseException
- If an error occurs in the JE database.
ConfigException
- if a configuration related error occurs.public void close() throws com.sleepycat.je.DatabaseException
com.sleepycat.je.DatabaseException
- If an error occurs in the JE database.public RootContainer getRootContainer()
public DN2ID getDN2ID()
public ID2Entry getID2Entry()
public DN2URI getDN2URI()
public Index getID2Children()
public Index getID2Subtree()
public State getState()
public AttributeIndex getAttributeIndex(AttributeType attrType)
attrType
- The attribute type for which an attribute index is needed.
public java.util.Map<AttributeType,AttributeIndex> getAttributeIndexMap()
public VLVIndex getVLVIndex(java.lang.String vlvIndexName)
vlvIndexName
- The vlv index name for which an vlv index is needed.
public java.util.Collection<AttributeIndex> getAttributeIndexes()
public java.util.Collection<VLVIndex> getVLVIndexes()
public EntryID getHighestEntryID() throws com.sleepycat.je.DatabaseException
com.sleepycat.je.DatabaseException
- If an error occurs in the JE database.public long getNumSubordinates(DN entryDN, boolean subtree) throws com.sleepycat.je.DatabaseException
entryDN
- The distinguished name of the entry.subtree
- true
will include all the entries under the
given entries. false
will only return the
number of entries immediately under the given entry.
com.sleepycat.je.DatabaseException
- If an error occurs in the JE database.public void search(SearchOperation searchOperation) throws DirectoryException, com.sleepycat.je.DatabaseException, JebException
SearchOperation.returnEntry
method.
searchOperation
- The search operation to be processed.
DirectoryException
- If a problem occurs while processing the
search.
com.sleepycat.je.DatabaseException
- If an error occurs in the JE database.
JebException
- If an error occurs in the JE database.public void addEntry(Entry entry, AddOperation addOperation) throws com.sleepycat.je.DatabaseException, DirectoryException, JebException
entry
- The entry to add to this database.addOperation
- The add operation with which the new entry is
associated. This may be null
for adds
performed internally.
DirectoryException
- If a problem occurs while trying to add the
entry.
com.sleepycat.je.DatabaseException
- If an error occurs in the JE database.
JebException
- If an error occurs in the JE backend.public void deleteEntry(DN entryDN, DeleteOperation deleteOperation) throws DirectoryException, com.sleepycat.je.DatabaseException, JebException
entryDN
- The DN of the entry to remove from this database.deleteOperation
- The delete operation with which this action is
associated. This may be null
for
deletes performed internally.
DirectoryException
- If a problem occurs while trying to remove the
entry.
com.sleepycat.je.DatabaseException
- If an error occurs in the JE database.
JebException
- If an error occurs in the JE backend.public boolean entryExists(DN entryDN) throws DirectoryException
entryDN
- The DN of the entry for which to determine existence.
true
if the specified entry exists,
or false
if it does not.
DirectoryException
- If a problem occurs while trying to make the
determination.public Entry getEntry(DN entryDN) throws JebException, com.sleepycat.je.DatabaseException, DirectoryException
entryDN
- The distinguished name of the entry to retrieve.
null
if the entry does not
exist.
DirectoryException
- If a problem occurs while trying to retrieve
the entry.
JebException
- If an error occurs in the JE backend.
com.sleepycat.je.DatabaseException
- An error occurred during a database operation.public void replaceEntry(Entry entry, ModifyOperation modifyOperation) throws com.sleepycat.je.DatabaseException, DirectoryException, JebException
entry
- The new contents of the entrymodifyOperation
- The modify operation with which this action is
associated. This may be null
for
modifications performed internally.
com.sleepycat.je.DatabaseException
- If an error occurs in the JE database.
DirectoryException
- If a Directory Server error occurs.
JebException
- If an error occurs in the JE backend.public void renameEntry(DN currentDN, Entry entry, ModifyDNOperation modifyDNOperation) throws com.sleepycat.je.DatabaseException, JebException, DirectoryException, CanceledOperationException
currentDN
- The current DN of the entry to be replaced.entry
- The new content to use for the entry.modifyDNOperation
- The modify DN operation with which this action
is associated. This may be null
for modify DN operations performed internally.
DirectoryException
- If a problem occurs while trying to perform
the rename.
CanceledOperationException
- If this backend noticed and reacted
to a request to cancel or abandon the
modify DN operation.
com.sleepycat.je.DatabaseException
- If an error occurs in the JE database.
JebException
- If an error occurs in the JE backend.public static DN modDN(DN oldDN, int oldSuffixLen, DN newSuffixDN)
oldDN
- The current DN of the subordinate entry.oldSuffixLen
- The current DN length of the renamed or moved entry.newSuffixDN
- The new DN of the renamed or moved entry.
public long getEntryCount() throws com.sleepycat.je.DatabaseException
com.sleepycat.je.DatabaseException
- If an error occurs in the JE database.public int getEntryLimitExceededCount()
public void listDatabases(java.util.List<DatabaseContainer> dbList)
dbList
- A list of database containers.public static boolean isManageDsaITOperation(Operation operation)
operation
- The operation for which the determination is to be made.
public com.sleepycat.je.Transaction beginTransaction() throws com.sleepycat.je.DatabaseException
com.sleepycat.je.DatabaseException
- If an error occurs while attempting to begin
a new transaction.public static void transactionCommit(com.sleepycat.je.Transaction txn) throws com.sleepycat.je.DatabaseException
txn
- The JE transaction handle.
com.sleepycat.je.DatabaseException
- If an error occurs while attempting to commit
the transaction.public static void transactionAbort(com.sleepycat.je.Transaction txn) throws com.sleepycat.je.DatabaseException
txn
- The JE transaction handle.
com.sleepycat.je.DatabaseException
- If an error occurs while attempting to abort the
transaction.public void delete() throws com.sleepycat.je.DatabaseException
com.sleepycat.je.DatabaseException
- If an error occurs while removing the entry
container.public void deleteDatabase(DatabaseContainer database) throws com.sleepycat.je.DatabaseException
database
- The database container to remove.
com.sleepycat.je.DatabaseException
- If an error occurs while attempting to delete the
database.public void deleteAttributeIndex(AttributeIndex index) throws com.sleepycat.je.DatabaseException
index
- The attribute index to remove.
com.sleepycat.je.DatabaseException
- If an JE database error occurs while attempting
to delete the index.public java.lang.String getDatabasePrefix()
public void setDatabasePrefix(java.lang.String newDatabasePrefix) throws com.sleepycat.je.DatabaseException, JebException
newDatabasePrefix
- The new database prefix to use.
com.sleepycat.je.DatabaseException
- If an error occurs in the JE database.
JebException
- If an error occurs in the JE backend.public DN getBaseDN()
public DN getParentWithinBase(DN dn)
dn
- A DN which is in the scope of the base DN.
public boolean isConfigurationChangeAcceptable(LocalDBBackendCfg cfg, java.util.List<Message> unacceptableReasons)
isConfigurationChangeAcceptable
in interface ConfigurationChangeListener<LocalDBBackendCfg>
cfg
- The new configuration containing the changes.unacceptableReasons
- A list that can be used to hold messages about why the
provided configuration is not acceptable.
true
if the proposed change is
acceptable, or false
if it is not.public ConfigChangeResult applyConfigurationChange(LocalDBBackendCfg cfg)
applyConfigurationChange
in interface ConfigurationChangeListener<LocalDBBackendCfg>
cfg
- The new configuration containing the changes.
public com.sleepycat.je.EnvironmentConfig getEnvironmentConfig() throws com.sleepycat.je.DatabaseException
com.sleepycat.je.DatabaseException
- If an error occurs while retriving the
configuration object.public long clear() throws com.sleepycat.je.DatabaseException
com.sleepycat.je.DatabaseException
- If an error occurs while removing the entry
container.public long clearDatabase(DatabaseContainer database) throws com.sleepycat.je.DatabaseException
database
- The database to clear.
com.sleepycat.je.DatabaseException
- if a JE database error occurs.public long clearAttributeIndex(AttributeIndex index) throws com.sleepycat.je.DatabaseException
index
- The attribute index to clear.
com.sleepycat.je.DatabaseException
- if a JE database error occurs.public void lock()
public void unlock()
public int getSubtreeDeleteBatchSize()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |