public abstract class AbstractXdbmPartition<ID> extends BTreePartition<ID>
Store.| Modifier and Type | Field and Description |
|---|---|
protected boolean |
optimizerEnabled |
protected Store<org.apache.directory.shared.ldap.entry.ServerEntry,ID> |
store
The store.
|
cacheSize, contextEntry, id, optimizer, schemaManager, searchEngine, suffix, SYS_INDEX_OIDSinitialized| Modifier | Constructor and Description |
|---|---|
protected |
AbstractXdbmPartition(Store<org.apache.directory.shared.ldap.entry.ServerEntry,ID> store) |
| Modifier and Type | Method and Description |
|---|---|
void |
add(AddOperationContext addContext)
Adds an entry to this ContextPartition.
|
void |
addIndexOn(Index<? extends Object,org.apache.directory.shared.ldap.entry.ServerEntry,ID> index) |
void |
bind(BindOperationContext bindContext)
Represents a bind operation issued to authenticate a client.
|
void |
bind(org.apache.directory.shared.ldap.name.DN bindDn,
byte[] credentials,
List<String> mechanisms,
String saslAuthId) |
int |
count()
Gets the count of the total number of entries in the database.
|
void |
delete(ID id) |
protected void |
doDestroy()
Override this method to put your initialization code.
|
Index<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 |
getChildCount(ID id) |
String |
getEntryDn(ID id) |
ID |
getEntryId(String dn) |
String |
getEntryUpdn(ID id)
Gets the user provided distinguished name.
|
String |
getEntryUpdn(String dn)
Gets the user provided distinguished name.
|
Index<String,org.apache.directory.shared.ldap.entry.ServerEntry,ID> |
getExistenceIndex() |
Index<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.
|
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.
|
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.
|
ID |
getParentId(ID childId) |
ID |
getParentId(String dn) |
Index<String,org.apache.directory.shared.ldap.entry.ServerEntry,ID> |
getPresenceIndex() |
String |
getProperty(String propertyName) |
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.
|
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.
|
Index<? extends Object,org.apache.directory.shared.ldap.entry.ServerEntry,ID> |
getSystemIndex(String id) |
Iterator<String> |
getSystemIndices() |
Index<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.
|
Index<? extends Object,org.apache.directory.shared.ldap.entry.ServerEntry,ID> |
getUserIndex(String id) |
Iterator<String> |
getUserIndices() |
boolean |
hasSystemIndexOn(String id) |
boolean |
hasUserIndexOn(String id) |
boolean |
isInitialized()
Returns true if this context partition is initialized successfully.
|
boolean |
isOptimizerEnabled() |
boolean |
isSyncOnWrite() |
IndexCursor<ID,org.apache.directory.shared.ldap.entry.ServerEntry,ID> |
list(ID id) |
ClonedServerEntry |
lookup(ID id) |
void |
modify(ModifyOperationContext modifyContext)
Modifies an entry by adding, removing or replacing a set of attributes.
|
void |
move(MoveOperationContext moveContext)
Transplants a child entry, to a position in the namespace under a new
parent entry.
|
void |
moveAndRename(MoveAndRenameOperationContext moveAndRenameContext)
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.
|
void |
rename(RenameOperationContext renameContext)
Modifies an entry by changing its relative name.
|
void |
setAliasIndexOn(Index<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 |
setNdnIndexOn(Index<String,org.apache.directory.shared.ldap.entry.ServerEntry,ID> index)
Sets the normalized distinguished name Index.
|
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.
|
void |
setOneLevelIndexOn(Index<ID,org.apache.directory.shared.ldap.entry.ServerEntry,ID> index)
Sets the one level Index.
|
void |
setOptimizerEnabled(boolean optimizerEnabled) |
void |
setPresenceIndexOn(Index<String,org.apache.directory.shared.ldap.entry.ServerEntry,ID> index)
Sets the attribute existence Index.
|
void |
setProperty(String propertyName,
String propertyValue) |
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 |
setSyncOnWrite(boolean syncOnWrite) |
void |
setUpdnIndexOn(Index<String,org.apache.directory.shared.ldap.entry.ServerEntry,ID> index)
Sets the user provided distinguished name Index.
|
void |
sync()
This method does nothing by default.
|
String |
toString() |
void |
unbind(UnbindOperationContext unbindContext)
Represents an unbind operation issued by an authenticated client.
|
addIndexedAttributes, delete, getCacheSize, getId, getIndexedAttributes, getPartitionDir, getSchemaManager, getSearchEngine, getSuffix, getSuffixDn, hasEntry, list, lookup, search, setCacheSize, setId, setIndexedAttributes, setPartitionDir, setSchemaManager, setSuffixdestroy, doInit, initializeprotected void doDestroy()
throws Exception
doDestroy in class AbstractPartitionExceptionpublic final boolean isInitialized()
isInitialized in interface PartitionisInitialized in class AbstractPartitionpublic final void sync()
throws Exception
public boolean isOptimizerEnabled()
public void setOptimizerEnabled(boolean optimizerEnabled)
public void setSyncOnWrite(boolean syncOnWrite)
public boolean isSyncOnWrite()
public final void addIndexOn(Index<? extends Object,org.apache.directory.shared.ldap.entry.ServerEntry,ID> index) throws Exception
addIndexOn in class BTreePartition<ID>Exceptionpublic final Index<String,org.apache.directory.shared.ldap.entry.ServerEntry,ID> getExistenceIndex()
public final void setPresenceIndexOn(Index<String,org.apache.directory.shared.ldap.entry.ServerEntry,ID> index) throws Exception
BTreePartitionsetPresenceIndexOn in class BTreePartition<ID>index - the attribute existence IndexException - if there is a problem setting up the indexpublic final Index<ID,org.apache.directory.shared.ldap.entry.ServerEntry,ID> getOneLevelIndex()
BTreePartitiongetOneLevelIndex in class BTreePartition<ID>public final void setOneLevelIndexOn(Index<ID,org.apache.directory.shared.ldap.entry.ServerEntry,ID> index) throws Exception
BTreePartitionsetOneLevelIndexOn in class BTreePartition<ID>index - the one level IndexException - if there is a problem setting up the indexpublic final Index<String,org.apache.directory.shared.ldap.entry.ServerEntry,ID> getAliasIndex()
BTreePartitiongetAliasIndex in class BTreePartition<ID>public final void setAliasIndexOn(Index<String,org.apache.directory.shared.ldap.entry.ServerEntry,ID> index) throws Exception
BTreePartitionsetAliasIndexOn in class BTreePartition<ID>index - the index on the ALIAS_ATTRIBUTEException - if there is a problem setting up the indexpublic final Index<ID,org.apache.directory.shared.ldap.entry.ServerEntry,ID> getOneAliasIndex()
BTreePartitiongetOneAliasIndex in class BTreePartition<ID>public final void setOneAliasIndexOn(Index<ID,org.apache.directory.shared.ldap.entry.ServerEntry,ID> index) throws Exception
BTreePartitionsetOneAliasIndexOn in class BTreePartition<ID>index - a one level alias indexException - if there is a problem setting up the indexpublic final Index<ID,org.apache.directory.shared.ldap.entry.ServerEntry,ID> getSubAliasIndex()
BTreePartitiongetSubAliasIndex in class BTreePartition<ID>public final void setSubAliasIndexOn(Index<ID,org.apache.directory.shared.ldap.entry.ServerEntry,ID> index) throws Exception
BTreePartitionsetSubAliasIndexOn in class BTreePartition<ID>index - a subtree alias indexException - if there is a problem setting up the indexpublic final Index<String,org.apache.directory.shared.ldap.entry.ServerEntry,ID> getUpdnIndex()
BTreePartitiongetUpdnIndex in class BTreePartition<ID>public final void setUpdnIndexOn(Index<String,org.apache.directory.shared.ldap.entry.ServerEntry,ID> index) throws Exception
BTreePartitionsetUpdnIndexOn in class BTreePartition<ID>index - the updn IndexException - if there is a problem setting up the indexpublic final Index<String,org.apache.directory.shared.ldap.entry.ServerEntry,ID> getNdnIndex()
BTreePartitiongetNdnIndex in class BTreePartition<ID>public final void setNdnIndexOn(Index<String,org.apache.directory.shared.ldap.entry.ServerEntry,ID> index) throws Exception
BTreePartitionsetNdnIndexOn in class BTreePartition<ID>index - the ndn IndexException - if there is a problem setting up the indexpublic final Iterator<String> getUserIndices()
getUserIndices in class BTreePartition<ID>public final Iterator<String> getSystemIndices()
getSystemIndices in class BTreePartition<ID>public final boolean hasUserIndexOn(String id) throws Exception
hasUserIndexOn in class BTreePartition<ID>Exceptionpublic final boolean hasSystemIndexOn(String id) throws Exception
hasSystemIndexOn in class BTreePartition<ID>Exceptionpublic final Index<? extends Object,org.apache.directory.shared.ldap.entry.ServerEntry,ID> getUserIndex(String id) throws IndexNotFoundException
getUserIndex in class BTreePartition<ID>IndexNotFoundExceptionBTreePartition.getUserIndex(String)public final Index<? extends Object,org.apache.directory.shared.ldap.entry.ServerEntry,ID> getSystemIndex(String id) throws IndexNotFoundException
getSystemIndex in class BTreePartition<ID>IndexNotFoundExceptionBTreePartition.getEntryId(String)public final ID getEntryId(String dn) throws Exception
getEntryId in class BTreePartition<ID>Exceptionpublic final String getEntryDn(ID id) throws Exception
getEntryDn in class BTreePartition<ID>Exceptionpublic final ID getParentId(String dn) throws Exception
getParentId in class BTreePartition<ID>Exceptionpublic final ID getParentId(ID childId) throws Exception
getParentId in class BTreePartition<ID>Exceptionpublic final String getEntryUpdn(ID id) throws Exception
BTreePartitiongetEntryUpdn in class BTreePartition<ID>id - the entry idException - if the updn index cannot be accessedpublic final String getEntryUpdn(String dn) throws Exception
BTreePartitiongetEntryUpdn in class BTreePartition<ID>dn - the normalized distinguished nameException - if the updn and ndn indices cannot be accessedpublic final int count()
throws Exception
BTreePartitioncount in class BTreePartition<ID>Exception - if there is a failure to read the countpublic final void add(AddOperationContext addContext) throws Exception
Partitionpublic final ClonedServerEntry lookup(ID id) throws Exception
lookup in class BTreePartition<ID>Exceptionpublic final void delete(ID id) throws Exception
delete in class BTreePartition<ID>Exceptionpublic final IndexCursor<ID,org.apache.directory.shared.ldap.entry.ServerEntry,ID> list(ID id) throws Exception
list in class BTreePartition<ID>Exceptionpublic final int getChildCount(ID id) throws Exception
getChildCount in class BTreePartition<ID>Exceptionpublic final void setProperty(String propertyName, String propertyValue) throws Exception
setProperty in class BTreePartition<ID>Exceptionpublic final String getProperty(String propertyName) throws Exception
getProperty in class BTreePartition<ID>Exceptionpublic final void modify(ModifyOperationContext modifyContext) throws Exception
Partitionmodify in interface Partitionmodify in class BTreePartition<ID>modifyContext - 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.Exception - if there are any problemsDirContext,
DirContext.ADD_ATTRIBUTE,
DirContext.REMOVE_ATTRIBUTE,
DirContext.REPLACE_ATTRIBUTEpublic final void rename(RenameOperationContext renameContext) throws Exception
Partitionpublic final void moveAndRename(MoveAndRenameOperationContext moveAndRenameContext) throws Exception
PartitionmoveAndRename in interface PartitionmoveAndRename in class BTreePartition<ID>moveAndRenameContext - The context contain all the information about
the modifyDN operationException - if there are any problemspublic final void move(MoveOperationContext moveContext) throws Exception
Partitionpublic final void bind(org.apache.directory.shared.ldap.name.DN bindDn,
byte[] credentials,
List<String> mechanisms,
String saslAuthId)
throws Exception
Exceptionpublic final void bind(BindOperationContext bindContext) throws Exception
PartitionbindContext - the bind context, containing all the needed informations to bindException - if something goes wrongpublic final void unbind(UnbindOperationContext unbindContext) throws Exception
PartitionunbindContext - the context used to unbindException - if something goes wrongpublic final Index<String,org.apache.directory.shared.ldap.entry.ServerEntry,ID> getPresenceIndex()
getPresenceIndex in class BTreePartition<ID>public final Index<ID,org.apache.directory.shared.ldap.entry.ServerEntry,ID> getSubLevelIndex()
BTreePartitiongetSubLevelIndex in class BTreePartition<ID>Copyright © 2003-2012 Apache Software Foundation. All Rights Reserved.