|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.directory.server.core.partition.impl.btree.BTreePartition
An abstract Partition
that uses general BTree operations.
Field Summary |
Fields inherited from interface org.apache.directory.server.core.partition.Partition |
ALIAS_ATTRIBUTE, ALIAS_OBJECT |
Constructor Summary | |
protected |
BTreePartition()
Creates a B-tree based context partition. |
Method Summary | |
abstract void |
add(LdapDN dn,
javax.naming.directory.Attributes entry)
Adds an entry to this ContextPartition. |
abstract void |
addIndexOn(AttributeType attribute,
int cacheSize,
int numDupLimit)
|
abstract int |
count()
Gets the count of the total number of entries in the database. |
void |
delete(LdapDN dn)
Deletes a leaf entry from this ContextPartition: non-leaf entries cannot be deleted until this operation has been applied to their children. |
abstract void |
destroy()
Deinitialized this partition. |
abstract Index |
getAliasIndex()
Gets the system index defined on the ALIAS_ATTRIBUTE which for LDAP would be the aliasedObjectName and for X.500 would be aliasedEntryName. |
abstract int |
getChildCount(java.math.BigInteger id)
|
abstract java.lang.String |
getEntryDn(java.math.BigInteger id)
|
abstract java.math.BigInteger |
getEntryId(java.lang.String dn)
|
abstract java.lang.String |
getEntryUpdn(java.math.BigInteger id)
Gets the user provided distinguished name. |
abstract java.lang.String |
getEntryUpdn(java.lang.String dn)
Gets the user provided distinguished name. |
abstract Index |
getExistanceIndex()
|
abstract Index |
getHierarchyIndex()
Gets the Index mapping the BigInteger primary keys of parents to the BigInteger primary keys of their children. |
abstract javax.naming.directory.Attributes |
getIndices(java.math.BigInteger id)
|
abstract Index |
getNdnIndex()
Gets the Index mapping the normalized distinguished names of entries as Strings to the BigInteger primary keys of entries. |
abstract Index |
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 java.math.BigInteger |
getParentId(java.math.BigInteger childId)
|
abstract java.math.BigInteger |
getParentId(java.lang.String dn)
|
abstract java.lang.String |
getProperty(java.lang.String key)
|
SearchEngine |
getSearchEngine()
Gets the DefaultSearchEngine used by this ContextPartition to search the Database. |
abstract Index |
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 javax.naming.directory.Attributes |
getSuffixEntry()
|
abstract Index |
getSystemIndex(java.lang.String attribute)
|
abstract java.util.Iterator |
getSystemIndices()
|
abstract Index |
getUpdnIndex()
Gets the Index mapping user provided distinguished names of entries as Strings to the BigInteger primary keys of entries. |
abstract Index |
getUserIndex(java.lang.String attribute)
|
abstract java.util.Iterator |
getUserIndices()
|
boolean |
hasEntry(LdapDN dn)
Fast operation to check and see if a particular entry exists. |
abstract boolean |
hasSystemIndexOn(java.lang.String attribute)
|
abstract boolean |
hasUserIndexOn(java.lang.String attribute)
|
void |
init(DirectoryServiceConfiguration factoryCfg,
PartitionConfiguration cfg)
Initializes this partition. |
void |
inspect()
|
abstract boolean |
isInitialized()
Checks to see if this partition is initialized or not. |
boolean |
isSuffix(LdapDN dn)
Checks to see if name is a context suffix. |
javax.naming.NamingEnumeration |
list(LdapDN base)
A specialized form of one level search used to return a minimal set of information regarding child entries under a base. |
javax.naming.directory.Attributes |
lookup(LdapDN dn)
Looks up an entry by distinguished/absolute name. |
javax.naming.directory.Attributes |
lookup(LdapDN dn,
java.lang.String[] attrIds)
Looks up an entry by distinguished/absolute name. |
abstract void |
modify(LdapDN dn,
int modOp,
javax.naming.directory.Attributes mods)
Modifies an entry by adding, removing or replacing a set of attributes. |
abstract void |
modify(LdapDN dn,
javax.naming.directory.ModificationItem[] mods)
Modifies an entry by using a combination of adds, removes or replace operations using a set of ModificationItems. |
abstract void |
modifyRn(LdapDN dn,
java.lang.String newRdn,
boolean deleteOldRdn)
Modifies an entry by changing its relative name. |
abstract void |
move(LdapDN oldChildDn,
LdapDN newParentDn)
Transplants a child entry, to a position in the namespace under a new parent entry. |
abstract void |
move(LdapDN oldChildDn,
LdapDN newParentDn,
java.lang.String newRdn,
boolean deleteOldRdn)
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. |
javax.naming.NamingEnumeration |
search(LdapDN base,
java.util.Map env,
ExprNode filter,
javax.naming.directory.SearchControls searchCtls)
Conducts a search against this ContextPartition. |
abstract void |
setAliasIndexOn(AttributeType attrType,
int cacheSize,
int numDupLimit)
Sets the system index defined on the ALIAS_ATTRIBUTE which for LDAP would be the aliasedObjectName and for X.500 would be aliasedEntryName. |
abstract void |
setExistanceIndexOn(AttributeType attrType,
int cacheSize,
int numDupLimit)
Sets the attribute existance Index. |
abstract void |
setHierarchyIndexOn(AttributeType attrType,
int cacheSize,
int numDupLimit)
Sets the hierarchy Index. |
abstract void |
setNdnIndexOn(AttributeType attrType,
int cacheSize,
int numDupLimit)
Sets the normalized distinguished name Index. |
abstract void |
setOneAliasIndexOn(AttributeType attrType,
int cacheSize,
int numDupLimit)
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 |
setProperty(java.lang.String key,
java.lang.String value)
|
abstract void |
setSubAliasIndexOn(AttributeType attrType,
int cacheSize,
int numDupLimit)
Sets the alias index mapping relative entries with scope expanding alias descendents; this system index is used to dereference aliases on subtree scoped searches. |
abstract void |
setUpdnIndexOn(AttributeType attrType,
int cacheSize,
int numDupLimit)
Sets the user provided distinguished name Index. |
abstract void |
sync()
Flushes any changes made to this partition now. |
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, getSuffix, getUpSuffix, unbind |
Constructor Detail |
protected BTreePartition()
Method Detail |
public void init(DirectoryServiceConfiguration factoryCfg, PartitionConfiguration cfg) throws javax.naming.NamingException
Partition
init
in interface Partition
javax.naming.NamingException
public SearchEngine getSearchEngine()
public void delete(LdapDN dn) throws javax.naming.NamingException
Partition
delete
in interface Partition
dn
- the normalized distinguished/absolute name of the entry to
delete from this ContextPartition.
javax.naming.NamingException
- if there are any problemspublic abstract void add(LdapDN dn, javax.naming.directory.Attributes entry) throws javax.naming.NamingException
Partition
add
in interface Partition
dn
- entry
- the entry to add to this ContextPartition
javax.naming.NamingException
- if there are any problemspublic abstract void modify(LdapDN dn, int modOp, javax.naming.directory.Attributes mods) throws javax.naming.NamingException
Partition
modify
in interface Partition
dn
- the normalized distinguished/absolute name of the entry to
modifymodOp
- the modification operation to perform on the entry which
is one of constants specified by the DirContext interface:
ADD_ATTRIBUTE, REMOVE_ATTRIBUTE, REPLACE_ATTRIBUTE
.mods
- the attributes and their values used to affect the
modification with.
javax.naming.NamingException
- if there are any problemsDirContext
,
DirContext.ADD_ATTRIBUTE
,
DirContext.REMOVE_ATTRIBUTE
,
DirContext.REPLACE_ATTRIBUTE
public abstract void modify(LdapDN dn, javax.naming.directory.ModificationItem[] mods) throws javax.naming.NamingException
Partition
modify
in interface Partition
dn
- the normalized distinguished/absolute name of the entry to modifymods
- the ModificationItems used to affect the modification with
javax.naming.NamingException
- if there are any problemsModificationItem
public javax.naming.NamingEnumeration list(LdapDN base) throws javax.naming.NamingException
Partition
list
in interface Partition
base
- the base distinguished/absolute name for the search/listing
SearchResult
javax.naming.NamingException
- if there are any problemspublic javax.naming.NamingEnumeration search(LdapDN base, java.util.Map env, ExprNode filter, javax.naming.directory.SearchControls searchCtls) throws javax.naming.NamingException
Partition
search
in interface Partition
base
- the normalized distinguished/absolute name of the search baseenv
- the environment under which operation occursfilter
- the root node of the filter expression treesearchCtls
- the search controls
javax.naming.NamingException
- if there are any problemspublic javax.naming.directory.Attributes lookup(LdapDN dn) throws javax.naming.NamingException
Partition
lookup
in interface Partition
dn
- the normalized distinguished name of the object to lookup
javax.naming.NamingException
- if there are any problemspublic javax.naming.directory.Attributes lookup(LdapDN dn, java.lang.String[] attrIds) throws javax.naming.NamingException
Partition
lookup
in interface Partition
dn
- the normalized distinguished name of the object to lookupattrIds
- the set of attributes to return
javax.naming.NamingException
- if there are any problemspublic boolean hasEntry(LdapDN dn) throws javax.naming.NamingException
Partition
hasEntry
in interface Partition
dn
- the normalized distinguished/absolute name of the object to
check for existance
javax.naming.NamingException
- if there are any problemspublic abstract void modifyRn(LdapDN dn, java.lang.String newRdn, boolean deleteOldRdn) throws javax.naming.NamingException
Partition
modifyRn
in interface Partition
dn
- the normalized distinguished/absolute name of the entry to
modify the RN of.newRdn
- the new RN of the entry specified by namedeleteOldRdn
- boolean flag which removes the old RN attribute
from the entry if set to true, and has no affect if set to false
javax.naming.NamingException
- if there are any problemspublic abstract void move(LdapDN oldChildDn, LdapDN newParentDn) throws javax.naming.NamingException
Partition
move
in interface Partition
oldChildDn
- the normalized distinguished/absolute name of the
original child name representing the child entry to movenewParentDn
- the normalized distinguished/absolute name of the
new parent to move the target entry to
javax.naming.NamingException
- if there are any problemspublic abstract void move(LdapDN oldChildDn, LdapDN newParentDn, java.lang.String newRdn, boolean deleteOldRdn) throws javax.naming.NamingException
Partition
move
in interface Partition
oldChildDn
- the normalized distinguished/absolute name of the
original child name representing the child entry to movenewParentDn
- the normalized distinguished/absolute name of the
new parent to move the targeted entry tonewRdn
- the new RN of the entrydeleteOldRdn
- boolean flag which removes the old RN attribute
from the entry if set to true, and has no affect if set to false
javax.naming.NamingException
- if there are any problemspublic abstract void sync() throws javax.naming.NamingException
Partition
sync
in interface Partition
javax.naming.NamingException
public abstract void destroy()
Partition
destroy
in interface Partition
public abstract boolean isInitialized()
Partition
isInitialized
in interface Partition
public boolean isSuffix(LdapDN dn) throws javax.naming.NamingException
Partition
isSuffix
in interface Partition
dn
- the normalized distinguished/absolute name of the context
javax.naming.NamingException
- if there are any problemspublic void inspect() throws java.lang.Exception
java.lang.Exception
public abstract void addIndexOn(AttributeType attribute, int cacheSize, int numDupLimit) throws javax.naming.NamingException
javax.naming.NamingException
public abstract boolean hasUserIndexOn(java.lang.String attribute) throws javax.naming.NamingException
javax.naming.NamingException
public abstract boolean hasSystemIndexOn(java.lang.String attribute) throws javax.naming.NamingException
javax.naming.NamingException
public abstract Index getExistanceIndex()
public abstract Index getHierarchyIndex()
public abstract Index getUpdnIndex()
public abstract Index getNdnIndex()
public abstract Index getOneAliasIndex()
public abstract Index getSubAliasIndex()
public abstract Index getAliasIndex()
public abstract void setAliasIndexOn(AttributeType attrType, int cacheSize, int numDupLimit) throws javax.naming.NamingException
attrType
- the index on the ALIAS_ATTRIBUTE
javax.naming.NamingException
public abstract void setExistanceIndexOn(AttributeType attrType, int cacheSize, int numDupLimit) throws javax.naming.NamingException
attrType
- the attribute existance Index
javax.naming.NamingException
public abstract void setHierarchyIndexOn(AttributeType attrType, int cacheSize, int numDupLimit) throws javax.naming.NamingException
attrType
- the hierarchy Index
javax.naming.NamingException
public abstract void setUpdnIndexOn(AttributeType attrType, int cacheSize, int numDupLimit) throws javax.naming.NamingException
attrType
- the updn Index
javax.naming.NamingException
public abstract void setNdnIndexOn(AttributeType attrType, int cacheSize, int numDupLimit) throws javax.naming.NamingException
attrType
- the ndn Index
javax.naming.NamingException
public abstract void setOneAliasIndexOn(AttributeType attrType, int cacheSize, int numDupLimit) throws javax.naming.NamingException
attrType
- a one level alias index
javax.naming.NamingException
public abstract void setSubAliasIndexOn(AttributeType attrType, int cacheSize, int numDupLimit) throws javax.naming.NamingException
attrType
- a subtree alias index
javax.naming.NamingException
public abstract Index getUserIndex(java.lang.String attribute) throws IndexNotFoundException
IndexNotFoundException
public abstract Index getSystemIndex(java.lang.String attribute) throws IndexNotFoundException
IndexNotFoundException
public abstract java.math.BigInteger getEntryId(java.lang.String dn) throws javax.naming.NamingException
javax.naming.NamingException
public abstract java.lang.String getEntryDn(java.math.BigInteger id) throws javax.naming.NamingException
javax.naming.NamingException
public abstract java.math.BigInteger getParentId(java.lang.String dn) throws javax.naming.NamingException
javax.naming.NamingException
public abstract java.math.BigInteger getParentId(java.math.BigInteger childId) throws javax.naming.NamingException
javax.naming.NamingException
public abstract java.lang.String getEntryUpdn(java.math.BigInteger id) throws javax.naming.NamingException
id
- the entry id
javax.naming.NamingException
- if the updn index cannot be accessedpublic abstract java.lang.String getEntryUpdn(java.lang.String dn) throws javax.naming.NamingException
dn
- the normalized distinguished name
javax.naming.NamingException
- if the updn and ndn indices cannot be accessedpublic abstract int getChildCount(java.math.BigInteger id) throws javax.naming.NamingException
javax.naming.NamingException
public abstract javax.naming.directory.Attributes getSuffixEntry() throws javax.naming.NamingException
javax.naming.NamingException
public abstract void setProperty(java.lang.String key, java.lang.String value) throws javax.naming.NamingException
javax.naming.NamingException
public abstract java.lang.String getProperty(java.lang.String key) throws javax.naming.NamingException
javax.naming.NamingException
public abstract java.util.Iterator getUserIndices()
public abstract java.util.Iterator getSystemIndices()
public abstract javax.naming.directory.Attributes getIndices(java.math.BigInteger id) throws javax.naming.NamingException
javax.naming.NamingException
public abstract int count() throws javax.naming.NamingException
javax.naming.NamingException
- if there is a failure to read the count
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |