|
||||||||||
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
org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmPartition
public class JdbmPartition
A Partition
that stores entries in
JDBM database.
Field Summary |
---|
Fields inherited from class org.apache.directory.server.core.partition.impl.btree.BTreePartition |
---|
cacheSize, contextEntry, id, optimizer, registries, searchEngine, suffix, suffixDn, SYS_INDEX_OIDS |
Fields inherited from interface org.apache.directory.server.core.partition.Partition |
---|
DEFAULT_CACHE_SIZE, DEFAULT_PARTITION_IMPLEMENTATION, SYSTEM_PARTITION_NAME |
Constructor Summary | |
---|---|
JdbmPartition()
Creates a store based on JDBM B+Trees. |
Method Summary | |
---|---|
void |
add(AddOperationContext addContext)
Adds an entry to this ContextPartition. |
void |
addIndexOn(Index<java.lang.Long,ServerEntry> index)
|
void |
bind(BindOperationContext bindContext)
Represents a bind operation issued to authenticate a client. |
void |
bind(org.apache.directory.shared.ldap.name.LdapDN bindDn,
byte[] credentials,
java.util.List<java.lang.String> mechanisms,
java.lang.String saslAuthId)
|
int |
count()
Gets the count of the total number of entries in the database. |
void |
delete(java.lang.Long id)
|
void |
destroy()
Deinitialized this partition. |
Index<java.lang.String,ServerEntry> |
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(java.lang.Long id)
|
java.lang.String |
getEntryDn(java.lang.Long id)
|
java.lang.Long |
getEntryId(java.lang.String dn)
|
java.lang.String |
getEntryUpdn(java.lang.Long id)
Gets the user provided distinguished name. |
java.lang.String |
getEntryUpdn(java.lang.String dn)
Gets the user provided distinguished name. |
Index<java.lang.String,ServerEntry> |
getExistanceIndex()
|
java.util.Set<Index<?,ServerEntry>> |
getIndexedAttributes()
|
Index<java.lang.String,ServerEntry> |
getNdnIndex()
Gets the Index mapping the normalized distinguished names of entries as Strings to the BigInteger primary keys of entries. |
Index<java.lang.Long,ServerEntry> |
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<java.lang.Long,ServerEntry> |
getOneLevelIndex()
Gets the Index mapping the Long primary keys of parents to the Long primary keys of their children. |
java.lang.Long |
getParentId(java.lang.Long childId)
|
java.lang.Long |
getParentId(java.lang.String dn)
|
Index<java.lang.String,ServerEntry> |
getPresenceIndex()
|
java.lang.String |
getProperty(java.lang.String propertyName)
|
Index<java.lang.Long,ServerEntry> |
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<java.lang.Long,ServerEntry> |
getSubLevelIndex()
Gets the Index mapping the Long primary keys of ancestors to the Long primary keys of their descendants. |
java.lang.String |
getSuffix()
Gets the non-normalized suffix for this Partition as a string. |
org.apache.directory.shared.ldap.name.LdapDN |
getSuffixDn()
Gets the distinguished/absolute name of the suffix for all entries stored within this ContextPartition. |
Index<?,ServerEntry> |
getSystemIndex(java.lang.String id)
|
java.util.Iterator<java.lang.String> |
getSystemIndices()
|
Index<java.lang.String,ServerEntry> |
getUpdnIndex()
Gets the Index mapping user provided distinguished names of entries as Strings to the BigInteger primary keys of entries. |
org.apache.directory.shared.ldap.name.LdapDN |
getUpSuffixDn()
Gets the distinguished/absolute name of the suffix for all entries stored within this ContextPartition. |
Index<?,ServerEntry> |
getUserIndex(java.lang.String id)
|
java.util.Iterator<java.lang.String> |
getUserIndices()
|
boolean |
hasSystemIndexOn(java.lang.String id)
|
boolean |
hasUserIndexOn(java.lang.String id)
|
void |
init(DirectoryService directoryService)
Initializes this partition. |
protected void |
initRegistries(Registries registries)
|
boolean |
isInitialized()
Checks to see if this partition is initialized or not. |
boolean |
isOptimizerEnabled()
|
boolean |
isSyncOnWrite()
|
IndexCursor<java.lang.Long,ServerEntry> |
list(java.lang.Long id)
|
ClonedServerEntry |
lookup(java.lang.Long 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<java.lang.String,ServerEntry> 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 |
setIndexedAttributes(java.util.Set<Index<?,ServerEntry>> indexedAttributes)
|
void |
setNdnIndexOn(Index<java.lang.String,ServerEntry> index)
Sets the normalized distinguished name Index. |
void |
setOneAliasIndexOn(Index<java.lang.Long,ServerEntry> 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<java.lang.Long,ServerEntry> index)
Sets the one level Index. |
void |
setOptimizerEnabled(boolean optimizerEnabled)
|
void |
setPresenceIndexOn(Index<java.lang.String,ServerEntry> index)
Sets the attribute existance Index. |
void |
setProperty(java.lang.String propertyName,
java.lang.String propertyValue)
|
void |
setRegistries(Registries registries)
Allows for schema entity registries to be swapped out during runtime. |
void |
setSubAliasIndexOn(Index<java.lang.Long,ServerEntry> 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 non-normalized suffix for this Partition as a string. |
void |
setSyncOnWrite(boolean syncOnWrite)
|
void |
setUpdnIndexOn(Index<java.lang.String,ServerEntry> index)
Sets the user provided distinguished name Index. |
void |
sync()
Flushes any changes made to this partition now. |
java.lang.String |
toString()
|
void |
unbind(UnbindOperationContext unbindContext)
Represents an unbind operation issued by an authenticated client. |
Methods inherited from class org.apache.directory.server.core.partition.impl.btree.BTreePartition |
---|
delete, getCacheSize, getId, getSearchEngine, hasEntry, inspect, list, lookup, search, setCacheSize, setId |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public JdbmPartition()
Method Detail |
---|
public java.lang.String getSuffix()
Partition
public void setSuffix(java.lang.String suffix)
Partition
suffix
- the suffix string for this Partition.public void setIndexedAttributes(java.util.Set<Index<?,ServerEntry>> indexedAttributes)
public java.util.Set<Index<?,ServerEntry>> getIndexedAttributes()
public boolean isOptimizerEnabled()
public void setOptimizerEnabled(boolean optimizerEnabled)
public void setSyncOnWrite(boolean syncOnWrite)
public boolean isSyncOnWrite()
public void setRegistries(Registries registries) throws java.lang.Exception
BTreePartition
setRegistries
in class BTreePartition
registries
- the schema entity registries
java.lang.Exception
protected void initRegistries(Registries registries) throws java.lang.Exception
java.lang.Exception
public final void init(DirectoryService directoryService) throws java.lang.Exception
Partition
directoryService
- the directory core for the server.
java.lang.Exception
- if initialization fails in any waypublic final void destroy() throws java.lang.Exception
Partition
destroy
in interface Partition
destroy
in class BTreePartition
java.lang.Exception
public final boolean isInitialized()
Partition
isInitialized
in interface Partition
isInitialized
in class BTreePartition
public final void sync() throws java.lang.Exception
Partition
sync
in interface Partition
sync
in class BTreePartition
java.lang.Exception
- if buffers cannot be flushed to diskpublic final void addIndexOn(Index<java.lang.Long,ServerEntry> index) throws java.lang.Exception
addIndexOn
in class BTreePartition
java.lang.Exception
public final Index<java.lang.String,ServerEntry> getExistanceIndex()
public final void setPresenceIndexOn(Index<java.lang.String,ServerEntry> index) throws java.lang.Exception
BTreePartition
setPresenceIndexOn
in class BTreePartition
index
- the attribute existance Index
java.lang.Exception
- if there is a problem setting up the indexpublic final Index<java.lang.Long,ServerEntry> getOneLevelIndex()
BTreePartition
getOneLevelIndex
in class BTreePartition
public final void setOneLevelIndexOn(Index<java.lang.Long,ServerEntry> index) throws java.lang.Exception
BTreePartition
setOneLevelIndexOn
in class BTreePartition
index
- the one level Index
java.lang.Exception
- if there is a problem setting up the indexpublic final Index<java.lang.String,ServerEntry> getAliasIndex()
BTreePartition
getAliasIndex
in class BTreePartition
public final void setAliasIndexOn(Index<java.lang.String,ServerEntry> index) throws java.lang.Exception
BTreePartition
setAliasIndexOn
in class BTreePartition
index
- the index on the ALIAS_ATTRIBUTE
java.lang.Exception
- if there is a problem setting up the indexpublic final Index<java.lang.Long,ServerEntry> getOneAliasIndex()
BTreePartition
getOneAliasIndex
in class BTreePartition
public final void setOneAliasIndexOn(Index<java.lang.Long,ServerEntry> index) throws javax.naming.NamingException
BTreePartition
setOneAliasIndexOn
in class BTreePartition
index
- a one level alias index
javax.naming.NamingException
public final Index<java.lang.Long,ServerEntry> getSubAliasIndex()
BTreePartition
getSubAliasIndex
in class BTreePartition
public final void setSubAliasIndexOn(Index<java.lang.Long,ServerEntry> index) throws javax.naming.NamingException
BTreePartition
setSubAliasIndexOn
in class BTreePartition
index
- a subtree alias index
javax.naming.NamingException
public final Index<java.lang.String,ServerEntry> getUpdnIndex()
BTreePartition
getUpdnIndex
in class BTreePartition
public final void setUpdnIndexOn(Index<java.lang.String,ServerEntry> index) throws javax.naming.NamingException
BTreePartition
setUpdnIndexOn
in class BTreePartition
index
- the updn Index
javax.naming.NamingException
public final Index<java.lang.String,ServerEntry> getNdnIndex()
BTreePartition
getNdnIndex
in class BTreePartition
public final void setNdnIndexOn(Index<java.lang.String,ServerEntry> index) throws javax.naming.NamingException
BTreePartition
setNdnIndexOn
in class BTreePartition
index
- the ndn Index
javax.naming.NamingException
public final java.util.Iterator<java.lang.String> getUserIndices()
getUserIndices
in class BTreePartition
public final java.util.Iterator<java.lang.String> getSystemIndices()
getSystemIndices
in class BTreePartition
public final boolean hasUserIndexOn(java.lang.String id) throws javax.naming.NamingException
hasUserIndexOn
in class BTreePartition
javax.naming.NamingException
public final boolean hasSystemIndexOn(java.lang.String id) throws javax.naming.NamingException
hasSystemIndexOn
in class BTreePartition
javax.naming.NamingException
public final Index<?,ServerEntry> getUserIndex(java.lang.String id) throws IndexNotFoundException
getUserIndex
in class BTreePartition
IndexNotFoundException
BTreePartition.getUserIndex(String)
public final Index<?,ServerEntry> getSystemIndex(java.lang.String id) throws IndexNotFoundException
getSystemIndex
in class BTreePartition
IndexNotFoundException
BTreePartition.getEntryId(String)
public final java.lang.Long getEntryId(java.lang.String dn) throws java.lang.Exception
getEntryId
in class BTreePartition
java.lang.Exception
public final java.lang.String getEntryDn(java.lang.Long id) throws java.lang.Exception
getEntryDn
in class BTreePartition
java.lang.Exception
public final java.lang.Long getParentId(java.lang.String dn) throws java.lang.Exception
getParentId
in class BTreePartition
java.lang.Exception
public final java.lang.Long getParentId(java.lang.Long childId) throws java.lang.Exception
getParentId
in class BTreePartition
java.lang.Exception
public final java.lang.String getEntryUpdn(java.lang.Long id) throws java.lang.Exception
BTreePartition
getEntryUpdn
in class BTreePartition
id
- the entry id
java.lang.Exception
- if the updn index cannot be accessedpublic final java.lang.String getEntryUpdn(java.lang.String dn) throws java.lang.Exception
BTreePartition
getEntryUpdn
in class BTreePartition
dn
- the normalized distinguished name
java.lang.Exception
- if the updn and ndn indices cannot be accessedpublic final int count() throws java.lang.Exception
BTreePartition
count
in class BTreePartition
java.lang.Exception
- if there is a failure to read the countpublic final void add(AddOperationContext addContext) throws java.lang.Exception
Partition
add
in interface Partition
add
in class BTreePartition
addContext
- the context used to add and entry to this ContextPartition
java.lang.Exception
- if there are any problemspublic final ClonedServerEntry lookup(java.lang.Long id) throws java.lang.Exception
lookup
in interface Partition
lookup
in class BTreePartition
java.lang.Exception
public final void delete(java.lang.Long id) throws java.lang.Exception
delete
in class BTreePartition
java.lang.Exception
public final IndexCursor<java.lang.Long,ServerEntry> list(java.lang.Long id) throws java.lang.Exception
list
in class BTreePartition
java.lang.Exception
public final int getChildCount(java.lang.Long id) throws java.lang.Exception
getChildCount
in class BTreePartition
java.lang.Exception
public final org.apache.directory.shared.ldap.name.LdapDN getSuffixDn()
Partition
public final org.apache.directory.shared.ldap.name.LdapDN getUpSuffixDn()
Partition
public final void setProperty(java.lang.String propertyName, java.lang.String propertyValue) throws java.lang.Exception
setProperty
in class BTreePartition
java.lang.Exception
public final java.lang.String getProperty(java.lang.String propertyName) throws java.lang.Exception
getProperty
in class BTreePartition
java.lang.Exception
public final void modify(ModifyOperationContext modifyContext) throws java.lang.Exception
Partition
modify
in interface Partition
modify
in class BTreePartition
modifyContext
- The contetx containin the modification operation
to perform on the entry which is one of constants specified by the
DirContext interface:
ADD_ATTRIBUTE, REMOVE_ATTRIBUTE, REPLACE_ATTRIBUTE
.
java.lang.Exception
- if there are any problemsDirContext
,
DirContext.ADD_ATTRIBUTE
,
DirContext.REMOVE_ATTRIBUTE
,
DirContext.REPLACE_ATTRIBUTE
public final void rename(RenameOperationContext renameContext) throws java.lang.Exception
Partition
rename
in interface Partition
rename
in class BTreePartition
renameContext
- the modify DN context
java.lang.Exception
- if there are any problemspublic final void moveAndRename(MoveAndRenameOperationContext moveAndRenameContext) throws java.lang.Exception
Partition
moveAndRename
in interface Partition
moveAndRename
in class BTreePartition
moveAndRenameContext
- The context contain all the information about
the modifyDN operation
java.lang.Exception
- if there are any problemspublic final void move(MoveOperationContext moveContext) throws java.lang.Exception
Partition
move
in interface Partition
move
in class BTreePartition
moveContext
- The context containing the DNs to move
java.lang.Exception
- if there are any problemspublic final void bind(org.apache.directory.shared.ldap.name.LdapDN bindDn, byte[] credentials, java.util.List<java.lang.String> mechanisms, java.lang.String saslAuthId) throws java.lang.Exception
java.lang.Exception
public final void bind(BindOperationContext bindContext) throws java.lang.Exception
Partition
bindContext
- the bind context, containing all the needed informations to bind
java.lang.Exception
- if something goes wrongpublic final void unbind(UnbindOperationContext unbindContext) throws java.lang.Exception
Partition
unbindContext
- the context used to unbind
java.lang.Exception
- if something goes wrongpublic Index<java.lang.String,ServerEntry> getPresenceIndex()
getPresenceIndex
in class BTreePartition
public Index<java.lang.Long,ServerEntry> getSubLevelIndex()
BTreePartition
getSubLevelIndex
in class BTreePartition
public java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |