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_OIDS
initialized
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, setSuffix
destroy, doInit, initialize
protected void doDestroy() throws Exception
doDestroy
in class AbstractPartition
Exception
public final boolean isInitialized()
isInitialized
in interface Partition
isInitialized
in class AbstractPartition
public 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>
Exception
public 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
BTreePartition
setPresenceIndexOn
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()
BTreePartition
getOneLevelIndex
in class BTreePartition<ID>
public final void setOneLevelIndexOn(Index<ID,org.apache.directory.shared.ldap.entry.ServerEntry,ID> index) throws Exception
BTreePartition
setOneLevelIndexOn
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()
BTreePartition
getAliasIndex
in class BTreePartition<ID>
public final void setAliasIndexOn(Index<String,org.apache.directory.shared.ldap.entry.ServerEntry,ID> index) throws Exception
BTreePartition
setAliasIndexOn
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()
BTreePartition
getOneAliasIndex
in class BTreePartition<ID>
public final void setOneAliasIndexOn(Index<ID,org.apache.directory.shared.ldap.entry.ServerEntry,ID> index) throws Exception
BTreePartition
setOneAliasIndexOn
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()
BTreePartition
getSubAliasIndex
in class BTreePartition<ID>
public final void setSubAliasIndexOn(Index<ID,org.apache.directory.shared.ldap.entry.ServerEntry,ID> index) throws Exception
BTreePartition
setSubAliasIndexOn
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()
BTreePartition
getUpdnIndex
in class BTreePartition<ID>
public final void setUpdnIndexOn(Index<String,org.apache.directory.shared.ldap.entry.ServerEntry,ID> index) throws Exception
BTreePartition
setUpdnIndexOn
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()
BTreePartition
getNdnIndex
in class BTreePartition<ID>
public final void setNdnIndexOn(Index<String,org.apache.directory.shared.ldap.entry.ServerEntry,ID> index) throws Exception
BTreePartition
setNdnIndexOn
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>
Exception
public final boolean hasSystemIndexOn(String id) throws Exception
hasSystemIndexOn
in class BTreePartition<ID>
Exception
public final Index<? extends Object,org.apache.directory.shared.ldap.entry.ServerEntry,ID> getUserIndex(String id) throws IndexNotFoundException
getUserIndex
in class BTreePartition<ID>
IndexNotFoundException
BTreePartition.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>
IndexNotFoundException
BTreePartition.getEntryId(String)
public final ID getEntryId(String dn) throws Exception
getEntryId
in class BTreePartition<ID>
Exception
public final String getEntryDn(ID id) throws Exception
getEntryDn
in class BTreePartition<ID>
Exception
public final ID getParentId(String dn) throws Exception
getParentId
in class BTreePartition<ID>
Exception
public final ID getParentId(ID childId) throws Exception
getParentId
in class BTreePartition<ID>
Exception
public final String getEntryUpdn(ID id) throws Exception
BTreePartition
getEntryUpdn
in class BTreePartition<ID>
id
- the entry idException
- if the updn index cannot be accessedpublic final String getEntryUpdn(String dn) throws Exception
BTreePartition
getEntryUpdn
in class BTreePartition<ID>
dn
- the normalized distinguished nameException
- if the updn and ndn indices cannot be accessedpublic final int count() throws Exception
BTreePartition
count
in class BTreePartition<ID>
Exception
- if there is a failure to read the countpublic final void add(AddOperationContext addContext) throws Exception
Partition
public final ClonedServerEntry lookup(ID id) throws Exception
lookup
in class BTreePartition<ID>
Exception
public final void delete(ID id) throws Exception
delete
in class BTreePartition<ID>
Exception
public final IndexCursor<ID,org.apache.directory.shared.ldap.entry.ServerEntry,ID> list(ID id) throws Exception
list
in class BTreePartition<ID>
Exception
public final int getChildCount(ID id) throws Exception
getChildCount
in class BTreePartition<ID>
Exception
public final void setProperty(String propertyName, String propertyValue) throws Exception
setProperty
in class BTreePartition<ID>
Exception
public final String getProperty(String propertyName) throws Exception
getProperty
in class BTreePartition<ID>
Exception
public final void modify(ModifyOperationContext modifyContext) throws Exception
Partition
modify
in interface Partition
modify
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_ATTRIBUTE
public final void rename(RenameOperationContext renameContext) throws Exception
Partition
public final void moveAndRename(MoveAndRenameOperationContext moveAndRenameContext) throws Exception
Partition
moveAndRename
in interface Partition
moveAndRename
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
Partition
public final void bind(org.apache.directory.shared.ldap.name.DN bindDn, byte[] credentials, List<String> mechanisms, String saslAuthId) throws Exception
Exception
public final void bind(BindOperationContext bindContext) throws Exception
Partition
bindContext
- the bind context, containing all the needed informations to bindException
- if something goes wrongpublic final void unbind(UnbindOperationContext unbindContext) throws Exception
Partition
unbindContext
- 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()
BTreePartition
getSubLevelIndex
in class BTreePartition<ID>
Copyright © 2003–2013 The Apache Software Foundation. All rights reserved.