org.apache.directory.server.core.partition.impl.btree
Class BTreePartition<ID>

java.lang.Object
  extended by org.apache.directory.server.core.partition.AbstractPartition
      extended by org.apache.directory.server.core.partition.impl.btree.BTreePartition<ID>
All Implemented Interfaces:
Partition
Direct Known Subclasses:
AbstractXdbmPartition, LdifPartition

public abstract class BTreePartition<ID>
extends AbstractPartition

An abstract Partition that uses general BTree operations.

Version:
$Rev: 927146 $
Author:
Apache Directory Project

Field Summary
protected  int cacheSize
           
protected  org.apache.directory.shared.ldap.entry.ServerEntry contextEntry
          The rootDSE context
protected  java.lang.String id
           
protected  Optimizer optimizer
           
protected  org.apache.directory.shared.ldap.schema.SchemaManager schemaManager
           
protected  SearchEngine<org.apache.directory.shared.ldap.entry.ServerEntry,ID> searchEngine
          the search engine used to search the database
protected  org.apache.directory.shared.ldap.name.DN suffix
           
protected static java.util.Set<java.lang.String> SYS_INDEX_OIDS
           
 
Fields inherited from class org.apache.directory.server.core.partition.AbstractPartition
initialized
 
Constructor Summary
protected BTreePartition()
          Creates a B-tree based context partition.
 
Method Summary
abstract  void add(AddOperationContext opContext)
          Adds an entry to this ContextPartition.
 void addIndexedAttributes(Index<? extends java.lang.Object,org.apache.directory.shared.ldap.entry.ServerEntry,ID>... indexes)
           
abstract  void addIndexOn(Index<? extends java.lang.Object,org.apache.directory.shared.ldap.entry.ServerEntry,ID> index)
           
abstract  int count()
          Gets the count of the total number of entries in the database.
 void delete(DeleteOperationContext opContext)
          Deletes a leaf entry from this ContextPartition: non-leaf entries cannot be deleted until this operation has been applied to their children.
abstract  void delete(ID id)
           
abstract  Index<java.lang.String,org.apache.directory.shared.ldap.entry.ServerEntry,ID> getAliasIndex()
          Gets the system index defined on the ALIAS_ATTRIBUTE which for LDAP would be the aliasedObjectName and for X.500 would be aliasedEntryName.
 int getCacheSize()
          Gets the entry cache size for this BTreePartition.
abstract  int getChildCount(ID id)
           
abstract  java.lang.String getEntryDn(ID id)
           
abstract  ID getEntryId(java.lang.String dn)
           
abstract  java.lang.String getEntryUpdn(ID id)
          Gets the user provided distinguished name.
abstract  java.lang.String getEntryUpdn(java.lang.String dn)
          Gets the user provided distinguished name.
 java.lang.String getId()
          Gets the unique identifier for this partition.
 java.util.Set<Index<? extends java.lang.Object,org.apache.directory.shared.ldap.entry.ServerEntry,ID>> getIndexedAttributes()
           
abstract  Index<java.lang.String,org.apache.directory.shared.ldap.entry.ServerEntry,ID> getNdnIndex()
          Gets the Index mapping the normalized distinguished names of entries as Strings to the BigInteger primary keys of entries.
abstract  Index<ID,org.apache.directory.shared.ldap.entry.ServerEntry,ID> getOneAliasIndex()
          Gets the alias index mapping parent entries with scope expanding aliases children one level below them; this system index is used to dereference aliases on one/single level scoped searches.
abstract  Index<ID,org.apache.directory.shared.ldap.entry.ServerEntry,ID> getOneLevelIndex()
          Gets the Index mapping the primary keys of parents to the primary keys of their children.
abstract  ID getParentId(ID childId)
           
abstract  ID getParentId(java.lang.String dn)
           
 java.io.File getPartitionDir()
          Gets the directory in which this Partition stores files.
abstract  Index<java.lang.String,org.apache.directory.shared.ldap.entry.ServerEntry,ID> getPresenceIndex()
           
abstract  java.lang.String getProperty(java.lang.String key)
           
 org.apache.directory.shared.ldap.schema.SchemaManager getSchemaManager()
          Gets the schema manager assigned to this Partition.
 SearchEngine<org.apache.directory.shared.ldap.entry.ServerEntry,ID> getSearchEngine()
          Gets the DefaultSearchEngine used by this ContextPartition to search the Database.
abstract  Index<ID,org.apache.directory.shared.ldap.entry.ServerEntry,ID> getSubAliasIndex()
          Gets the alias index mapping relative entries with scope expanding alias descendents; this system index is used to dereference aliases on subtree scoped searches.
abstract  Index<ID,org.apache.directory.shared.ldap.entry.ServerEntry,ID> getSubLevelIndex()
          Gets the Index mapping the primary keys of ancestors to the primary keys of their descendants.
 java.lang.String getSuffix()
          Gets the user provided suffix for this Partition as a String.
 org.apache.directory.shared.ldap.name.DN getSuffixDn()
          Gets the normalized suffix as an DN for this Partition after it has been initialized.
abstract  Index<? extends java.lang.Object,org.apache.directory.shared.ldap.entry.ServerEntry,ID> getSystemIndex(java.lang.String attribute)
           
abstract  java.util.Iterator<java.lang.String> getSystemIndices()
           
abstract  Index<java.lang.String,org.apache.directory.shared.ldap.entry.ServerEntry,ID> getUpdnIndex()
          Gets the Index mapping user provided distinguished names of entries as Strings to the BigInteger primary keys of entries.
abstract  Index<? extends java.lang.Object,org.apache.directory.shared.ldap.entry.ServerEntry,ID> getUserIndex(java.lang.String attribute)
           
abstract  java.util.Iterator<java.lang.String> getUserIndices()
           
 boolean hasEntry(EntryOperationContext opContext)
          This method calls Partition.lookup(LookupOperationContext) and return true if it returns an entry by default.
abstract  boolean hasSystemIndexOn(java.lang.String attribute)
           
abstract  boolean hasUserIndexOn(java.lang.String attribute)
           
abstract  IndexCursor<ID,org.apache.directory.shared.ldap.entry.ServerEntry,ID> list(ID id)
           
 EntryFilteringCursor list(ListOperationContext opContext)
          A specialized form of one level search used to return a minimal set of information regarding child entries under a base.
abstract  ClonedServerEntry lookup(ID id)
           
 ClonedServerEntry lookup(LookupOperationContext opContext)
          This method calls Partition.lookup(LookupOperationContext) with null attributeIds by default.
abstract  void modify(ModifyOperationContext opContext)
          Modifies an entry by adding, removing or replacing a set of attributes.
abstract  void move(MoveOperationContext opContext)
          Transplants a child entry, to a position in the namespace under a new parent entry.
abstract  void moveAndRename(MoveAndRenameOperationContext opContext)
          Transplants a child entry, to a position in the namespace under a new parent entry and changes the RN of the child entry which can optionally have its old RN attributes removed.
abstract  void rename(RenameOperationContext opContext)
          Modifies an entry by changing its relative name.
 EntryFilteringCursor search(SearchOperationContext opContext)
          Conducts a search against this ContextPartition.
abstract  void setAliasIndexOn(Index<java.lang.String,org.apache.directory.shared.ldap.entry.ServerEntry,ID> index)
          Sets the system index defined on the ALIAS_ATTRIBUTE which for LDAP would be the aliasedObjectName and for X.500 would be aliasedEntryName.
 void setCacheSize(int cacheSize)
          Used to specify the entry cache size for a Partition.
 void setId(java.lang.String id)
          Sets the unique identifier for this partition.
 void setIndexedAttributes(java.util.Set<Index<? extends java.lang.Object,org.apache.directory.shared.ldap.entry.ServerEntry,ID>> indexedAttributes)
           
abstract  void setNdnIndexOn(Index<java.lang.String,org.apache.directory.shared.ldap.entry.ServerEntry,ID> index)
          Sets the normalized distinguished name Index.
abstract  void setOneAliasIndexOn(Index<ID,org.apache.directory.shared.ldap.entry.ServerEntry,ID> index)
          Sets the alias index mapping parent entries with scope expanding aliases children one level below them; this system index is used to dereference aliases on one/single level scoped searches.
abstract  void setOneLevelIndexOn(Index<ID,org.apache.directory.shared.ldap.entry.ServerEntry,ID> index)
          Sets the one level Index.
 void setPartitionDir(java.io.File partitionDir)
          Sets the directory in which this Partition stores files.
abstract  void setPresenceIndexOn(Index<java.lang.String,org.apache.directory.shared.ldap.entry.ServerEntry,ID> index)
          Sets the attribute existence Index.
abstract  void setProperty(java.lang.String key, java.lang.String value)
           
 void setSchemaManager(org.apache.directory.shared.ldap.schema.SchemaManager schemaManager)
          Sets the schema manager assigned to this Partition.
abstract  void setSubAliasIndexOn(Index<ID,org.apache.directory.shared.ldap.entry.ServerEntry,ID> index)
          Sets the alias index mapping relative entries with scope expanding alias descendents; this system index is used to dereference aliases on subtree scoped searches.
 void setSuffix(java.lang.String suffix)
          Sets the user provided suffix for this Partition as a String.
abstract  void setUpdnIndexOn(Index<java.lang.String,org.apache.directory.shared.ldap.entry.ServerEntry,ID> index)
          Sets the user provided distinguished name Index.
abstract  void sync()
          This method does nothing by default.
 
Methods inherited from class org.apache.directory.server.core.partition.AbstractPartition
destroy, doDestroy, doInit, initialize, isInitialized
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.directory.server.core.partition.Partition
bind, unbind
 

Field Detail

SYS_INDEX_OIDS

protected static final java.util.Set<java.lang.String> SYS_INDEX_OIDS

searchEngine

protected SearchEngine<org.apache.directory.shared.ldap.entry.ServerEntry,ID> searchEngine
the search engine used to search the database


optimizer

protected Optimizer optimizer

schemaManager

protected org.apache.directory.shared.ldap.schema.SchemaManager schemaManager

id

protected java.lang.String id

cacheSize

protected int cacheSize

suffix

protected org.apache.directory.shared.ldap.name.DN suffix

contextEntry

protected org.apache.directory.shared.ldap.entry.ServerEntry contextEntry
The rootDSE context

Constructor Detail

BTreePartition

protected BTreePartition()
Creates a B-tree based context partition.

Method Detail

setSchemaManager

public void setSchemaManager(org.apache.directory.shared.ldap.schema.SchemaManager schemaManager)
Sets the schema manager assigned to this Partition.


getSchemaManager

public org.apache.directory.shared.ldap.schema.SchemaManager getSchemaManager()
Gets the schema manager assigned to this Partition.

Returns:
the schema manager

getPartitionDir

public java.io.File getPartitionDir()
Gets the directory in which this Partition stores files.

Returns:
the directory in which this Partition stores files.

setPartitionDir

public void setPartitionDir(java.io.File partitionDir)
Sets the directory in which this Partition stores files.

Parameters:
partitionDir - the directory in which this Partition stores files.

setIndexedAttributes

public void setIndexedAttributes(java.util.Set<Index<? extends java.lang.Object,org.apache.directory.shared.ldap.entry.ServerEntry,ID>> indexedAttributes)

addIndexedAttributes

public void addIndexedAttributes(Index<? extends java.lang.Object,org.apache.directory.shared.ldap.entry.ServerEntry,ID>... indexes)

getIndexedAttributes

public java.util.Set<Index<? extends java.lang.Object,org.apache.directory.shared.ldap.entry.ServerEntry,ID>> getIndexedAttributes()

setCacheSize

public void setCacheSize(int cacheSize)
Used to specify the entry cache size for a Partition. Various Partition implementations may interpret this value in different ways: i.e. total cache size limit verses the number of entries to cache.

Parameters:
cacheSize - the maximum size of the cache in the number of entries

getCacheSize

public int getCacheSize()
Gets the entry cache size for this BTreePartition.

Returns:
the maximum size of the cache as the number of entries maximum before paging out

getId

public java.lang.String getId()
Gets the unique identifier for this partition.

Returns:
the unique identifier for this partition

setId

public void setId(java.lang.String id)
Sets the unique identifier for this partition.

Parameters:
id - the unique identifier for this partition

getSearchEngine

public SearchEngine<org.apache.directory.shared.ldap.entry.ServerEntry,ID> getSearchEngine()
Gets the DefaultSearchEngine used by this ContextPartition to search the Database.

Returns:
the search engine

delete

public void delete(DeleteOperationContext opContext)
            throws java.lang.Exception
Deletes a leaf entry from this ContextPartition: non-leaf entries cannot be deleted until this operation has been applied to their children.

Parameters:
opContext - the context of the entry to delete from this ContextPartition.
Throws:
java.lang.Exception - if there are any problems

add

public abstract void add(AddOperationContext opContext)
                  throws java.lang.Exception
Description copied from interface: Partition
Adds an entry to this ContextPartition.

Parameters:
opContext - the context used to add and entry to this ContextPartition
Throws:
java.lang.Exception - if there are any problems

modify

public abstract void modify(ModifyOperationContext opContext)
                     throws java.lang.Exception
Description copied from interface: Partition
Modifies an entry by adding, removing or replacing a set of attributes.

Parameters:
opContext - The context containing the modification operation to perform on the entry which is one of constants specified by the DirContext interface: ADD_ATTRIBUTE, REMOVE_ATTRIBUTE, REPLACE_ATTRIBUTE.
Throws:
java.lang.Exception - if there are any problems
See Also:
DirContext, DirContext.ADD_ATTRIBUTE, DirContext.REMOVE_ATTRIBUTE, DirContext.REPLACE_ATTRIBUTE

list

public EntryFilteringCursor list(ListOperationContext opContext)
                          throws java.lang.Exception
Description copied from interface: Partition
A specialized form of one level search used to return a minimal set of information regarding child entries under a base. Convenience method used to optimize operations rather than conducting a full search with retrieval.

Parameters:
opContext - the context containing the distinguished/absolute name for the search/listing
Returns:
a NamingEnumeration containing objects of type ServerSearchResult
Throws:
java.lang.Exception - if there are any problems

search

public EntryFilteringCursor search(SearchOperationContext opContext)
                            throws java.lang.Exception
Description copied from interface: Partition
Conducts a search against this ContextPartition. Namespace specific parameters for search are contained within the environment using namespace specific keys into the hash. For example in the LDAP namespace a ContextPartition implementation may look for search Controls using a namespace specific or implementation specific key for the set of LDAP Controls.

Parameters:
opContext - The context containing the information used by the operation
Returns:
a NamingEnumeration containing objects of type
Throws:
java.lang.Exception - if there are any problems

lookup

public ClonedServerEntry lookup(LookupOperationContext opContext)
                         throws java.lang.Exception
Description copied from class: AbstractPartition
This method calls Partition.lookup(LookupOperationContext) with null attributeIds by default. Please override this method if there is more effective way for your implementation.

Specified by:
lookup in interface Partition
Specified by:
lookup in class AbstractPartition
Parameters:
opContext - The context containing the parameters
Returns:
an Attributes object representing the entry
Throws:
java.lang.Exception - if there are any problems

hasEntry

public boolean hasEntry(EntryOperationContext opContext)
                 throws java.lang.Exception
Description copied from class: AbstractPartition
This method calls Partition.lookup(LookupOperationContext) and return true if it returns an entry by default. Please override this method if there is more effective way for your implementation.

Specified by:
hasEntry in interface Partition
Overrides:
hasEntry in class AbstractPartition
Parameters:
opContext - The context used to pass informations
Returns:
true if the entry exists, false if it does not
Throws:
java.lang.Exception - if there are any problems

rename

public abstract void rename(RenameOperationContext opContext)
                     throws java.lang.Exception
Description copied from interface: Partition
Modifies an entry by changing its relative name. Optionally attributes associated with the old relative name can be removed from the entry. This makes sense only in certain namespaces like LDAP and will be ignored if it is irrelevant.

Parameters:
opContext - the modify DN context
Throws:
java.lang.Exception - if there are any problems

move

public abstract void move(MoveOperationContext opContext)
                   throws java.lang.Exception
Description copied from interface: Partition
Transplants a child entry, to a position in the namespace under a new parent entry.

Parameters:
opContext - The context containing the DNs to move
Throws:
java.lang.Exception - if there are any problems

moveAndRename

public abstract void moveAndRename(MoveAndRenameOperationContext opContext)
                            throws java.lang.Exception
Description copied from interface: Partition
Transplants a child entry, to a position in the namespace under a new parent entry and changes the RN of the child entry which can optionally have its old RN attributes removed. The removal of old RN attributes may not make sense in all namespaces. If the concept is undefined in a namespace this parameters is ignored. An example of a namespace where this parameter is significant is the LDAP namespace.

Parameters:
opContext - The context contain all the information about the modifyDN operation
Throws:
java.lang.Exception - if there are any problems

sync

public abstract void sync()
                   throws java.lang.Exception
Description copied from class: AbstractPartition
This method does nothing by default.

Specified by:
sync in interface Partition
Specified by:
sync in class AbstractPartition
Throws:
java.lang.Exception - if buffers cannot be flushed to disk

addIndexOn

public abstract void addIndexOn(Index<? extends java.lang.Object,org.apache.directory.shared.ldap.entry.ServerEntry,ID> index)
                         throws java.lang.Exception
Throws:
java.lang.Exception

hasUserIndexOn

public abstract boolean hasUserIndexOn(java.lang.String attribute)
                                throws java.lang.Exception
Throws:
java.lang.Exception

hasSystemIndexOn

public abstract boolean hasSystemIndexOn(java.lang.String attribute)
                                  throws java.lang.Exception
Throws:
java.lang.Exception

getPresenceIndex

public abstract Index<java.lang.String,org.apache.directory.shared.ldap.entry.ServerEntry,ID> getPresenceIndex()

getOneLevelIndex

public abstract Index<ID,org.apache.directory.shared.ldap.entry.ServerEntry,ID> getOneLevelIndex()
Gets the Index mapping the primary keys of parents to the primary keys of their children.

Returns:
the one level Index

getSubLevelIndex

public abstract Index<ID,org.apache.directory.shared.ldap.entry.ServerEntry,ID> getSubLevelIndex()
Gets the Index mapping the primary keys of ancestors to the primary keys of their descendants.

Returns:
the sub tree level Index

getUpdnIndex

public abstract Index<java.lang.String,org.apache.directory.shared.ldap.entry.ServerEntry,ID> getUpdnIndex()
Gets the Index mapping user provided distinguished names of entries as Strings to the BigInteger primary keys of entries.

Returns:
the user provided distinguished name Index

getNdnIndex

public abstract Index<java.lang.String,org.apache.directory.shared.ldap.entry.ServerEntry,ID> getNdnIndex()
Gets the Index mapping the normalized distinguished names of entries as Strings to the BigInteger primary keys of entries.

Returns:
the normalized distinguished name Index

getOneAliasIndex

public abstract Index<ID,org.apache.directory.shared.ldap.entry.ServerEntry,ID> getOneAliasIndex()
Gets the alias index mapping parent entries with scope expanding aliases children one level below them; this system index is used to dereference aliases on one/single level scoped searches.

Returns:
the one alias index

getSubAliasIndex

public abstract Index<ID,org.apache.directory.shared.ldap.entry.ServerEntry,ID> getSubAliasIndex()
Gets the alias index mapping relative entries with scope expanding alias descendents; this system index is used to dereference aliases on subtree scoped searches.

Returns:
the sub alias index

getAliasIndex

public abstract Index<java.lang.String,org.apache.directory.shared.ldap.entry.ServerEntry,ID> getAliasIndex()
Gets the system index defined on the ALIAS_ATTRIBUTE which for LDAP would be the aliasedObjectName and for X.500 would be aliasedEntryName.

Returns:
the index on the ALIAS_ATTRIBUTE

setAliasIndexOn

public abstract void setAliasIndexOn(Index<java.lang.String,org.apache.directory.shared.ldap.entry.ServerEntry,ID> index)
                              throws java.lang.Exception
Sets the system index defined on the ALIAS_ATTRIBUTE which for LDAP would be the aliasedObjectName and for X.500 would be aliasedEntryName.

Parameters:
index - the index on the ALIAS_ATTRIBUTE
Throws:
java.lang.Exception - if there is a problem setting up the index
XBean Property
hidden="true"

setPresenceIndexOn

public abstract void setPresenceIndexOn(Index<java.lang.String,org.apache.directory.shared.ldap.entry.ServerEntry,ID> index)
                                 throws java.lang.Exception
Sets the attribute existence Index.

Parameters:
index - the attribute existence Index
Throws:
java.lang.Exception - if there is a problem setting up the index
XBean Property
hidden="true"

setOneLevelIndexOn

public abstract void setOneLevelIndexOn(Index<ID,org.apache.directory.shared.ldap.entry.ServerEntry,ID> index)
                                 throws java.lang.Exception
Sets the one level Index.

Parameters:
index - the one level Index
Throws:
java.lang.Exception - if there is a problem setting up the index
XBean Property
hidden="true"

setUpdnIndexOn

public abstract void setUpdnIndexOn(Index<java.lang.String,org.apache.directory.shared.ldap.entry.ServerEntry,ID> index)
                             throws java.lang.Exception
Sets the user provided distinguished name Index.

Parameters:
index - the updn Index
Throws:
java.lang.Exception - if there is a problem setting up the index
XBean Property
hidden="true"

setNdnIndexOn

public abstract void setNdnIndexOn(Index<java.lang.String,org.apache.directory.shared.ldap.entry.ServerEntry,ID> index)
                            throws java.lang.Exception
Sets the normalized distinguished name Index.

Parameters:
index - the ndn Index
Throws:
java.lang.Exception - if there is a problem setting up the index
XBean Property
hidden="true"

setOneAliasIndexOn

public abstract void setOneAliasIndexOn(Index<ID,org.apache.directory.shared.ldap.entry.ServerEntry,ID> index)
                                 throws java.lang.Exception
Sets the alias index mapping parent entries with scope expanding aliases children one level below them; this system index is used to dereference aliases on one/single level scoped searches.

Parameters:
index - a one level alias index
Throws:
java.lang.Exception - if there is a problem setting up the index
XBean Property
hidden="true"

setSubAliasIndexOn

public abstract void setSubAliasIndexOn(Index<ID,org.apache.directory.shared.ldap.entry.ServerEntry,ID> index)
                                 throws java.lang.Exception
Sets the alias index mapping relative entries with scope expanding alias descendents; this system index is used to dereference aliases on subtree scoped searches.

Parameters:
index - a subtree alias index
Throws:
java.lang.Exception - if there is a problem setting up the index
XBean Property
hidden="true"

setSuffix

public void setSuffix(java.lang.String suffix)
               throws org.apache.directory.shared.ldap.exception.LdapInvalidDnException
Sets the user provided suffix for this Partition as a String.

Parameters:
suffix - the suffix String for this Partition.
Throws:
org.apache.directory.shared.ldap.exception.LdapInvalidDnException - if the suffix does not conform to LDAP DN syntax

getSuffix

public java.lang.String getSuffix()
Gets the user provided suffix for this Partition as a String.


getSuffixDn

public org.apache.directory.shared.ldap.name.DN getSuffixDn()
Gets the normalized suffix as an DN for this Partition after it has been initialized. Attempts to get this DN before initialization throw an IllegalStateException.

Returns:
the suffix for this Partition.

getUserIndex

public abstract Index<? extends java.lang.Object,org.apache.directory.shared.ldap.entry.ServerEntry,ID> getUserIndex(java.lang.String attribute)
                                                                                                              throws java.lang.Exception
Throws:
java.lang.Exception

getSystemIndex

public abstract Index<? extends java.lang.Object,org.apache.directory.shared.ldap.entry.ServerEntry,ID> getSystemIndex(java.lang.String attribute)
                                                                                                                throws java.lang.Exception
Throws:
java.lang.Exception

getEntryId

public abstract ID getEntryId(java.lang.String dn)
                       throws java.lang.Exception
Throws:
java.lang.Exception

getEntryDn

public abstract java.lang.String getEntryDn(ID id)
                                     throws java.lang.Exception
Throws:
java.lang.Exception

getParentId

public abstract ID getParentId(java.lang.String dn)
                        throws java.lang.Exception
Throws:
java.lang.Exception

getParentId

public abstract ID getParentId(ID childId)
                        throws java.lang.Exception
Throws:
java.lang.Exception

getEntryUpdn

public abstract java.lang.String getEntryUpdn(ID id)
                                       throws java.lang.Exception
Gets the user provided distinguished name.

Parameters:
id - the entry id
Returns:
the user provided distinguished name
Throws:
java.lang.Exception - if the updn index cannot be accessed

getEntryUpdn

public abstract java.lang.String getEntryUpdn(java.lang.String dn)
                                       throws java.lang.Exception
Gets the user provided distinguished name.

Parameters:
dn - the normalized distinguished name
Returns:
the user provided distinguished name
Throws:
java.lang.Exception - if the updn and ndn indices cannot be accessed

lookup

public abstract ClonedServerEntry lookup(ID id)
                                  throws java.lang.Exception
Throws:
java.lang.Exception

delete

public abstract void delete(ID id)
                     throws java.lang.Exception
Throws:
java.lang.Exception

list

public abstract IndexCursor<ID,org.apache.directory.shared.ldap.entry.ServerEntry,ID> list(ID id)
                                                                                    throws java.lang.Exception
Throws:
java.lang.Exception

getChildCount

public abstract int getChildCount(ID id)
                           throws java.lang.Exception
Throws:
java.lang.Exception

setProperty

public abstract void setProperty(java.lang.String key,
                                 java.lang.String value)
                          throws java.lang.Exception
Throws:
java.lang.Exception

getProperty

public abstract java.lang.String getProperty(java.lang.String key)
                                      throws java.lang.Exception
Throws:
java.lang.Exception

getUserIndices

public abstract java.util.Iterator<java.lang.String> getUserIndices()

getSystemIndices

public abstract java.util.Iterator<java.lang.String> getSystemIndices()

count

public abstract int count()
                   throws java.lang.Exception
Gets the count of the total number of entries in the database. TODO shouldn't this be a BigInteger instead of an int?

Returns:
the number of entries in the database
Throws:
java.lang.Exception - if there is a failure to read the count


Copyright © 2003-2011 Apache Software Foundation. All Rights Reserved.