|
||||||||||
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
public abstract class BTreePartition
An abstract Partition
that uses general BTree operations.
Field Summary | |
---|---|
protected int |
cacheSize
|
protected ServerEntry |
contextEntry
The rootDSE context |
protected java.lang.String |
id
|
protected Optimizer |
optimizer
|
protected Registries |
registries
|
protected SearchEngine<ServerEntry> |
searchEngine
the search engine used to search the database |
protected java.lang.String |
suffix
|
protected org.apache.directory.shared.ldap.name.LdapDN |
suffixDn
|
protected static java.util.Set<java.lang.String> |
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 | |
---|---|
protected |
BTreePartition()
Creates a B-tree based context partition. |
Method Summary | |
---|---|
abstract void |
add(AddOperationContext opContext)
Adds an entry to this ContextPartition. |
abstract void |
addIndexOn(Index<java.lang.Long,ServerEntry> 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(java.lang.Long id)
|
abstract void |
destroy()
Deinitialized this partition. |
abstract 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 |
getCacheSize()
Gets the entry cache size for this BTreePartition. |
abstract int |
getChildCount(java.lang.Long id)
|
abstract java.lang.String |
getEntryDn(java.lang.Long id)
|
abstract java.lang.Long |
getEntryId(java.lang.String dn)
|
abstract java.lang.String |
getEntryUpdn(java.lang.Long 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. |
abstract 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. |
abstract 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. |
abstract Index<java.lang.Long,ServerEntry> |
getOneLevelIndex()
Gets the Index mapping the Long primary keys of parents to the Long primary keys of their children. |
abstract java.lang.Long |
getParentId(java.lang.Long childId)
|
abstract java.lang.Long |
getParentId(java.lang.String dn)
|
abstract Index<java.lang.String,ServerEntry> |
getPresenceIndex()
|
abstract java.lang.String |
getProperty(java.lang.String key)
|
SearchEngine<ServerEntry> |
getSearchEngine()
Gets the DefaultSearchEngine used by this ContextPartition to search the Database. |
abstract 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. |
abstract Index<java.lang.Long,ServerEntry> |
getSubLevelIndex()
Gets the Index mapping the Long primary keys of ancestors to the Long primary keys of their descendants. |
abstract Index<?,ServerEntry> |
getSystemIndex(java.lang.String attribute)
|
abstract java.util.Iterator<java.lang.String> |
getSystemIndices()
|
abstract 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. |
abstract Index<?,ServerEntry> |
getUserIndex(java.lang.String attribute)
|
abstract java.util.Iterator<java.lang.String> |
getUserIndices()
|
boolean |
hasEntry(EntryOperationContext opContext)
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 |
inspect()
|
abstract boolean |
isInitialized()
Checks to see if this partition is initialized or not. |
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 IndexCursor<java.lang.Long,ServerEntry> |
list(java.lang.Long id)
|
abstract ClonedServerEntry |
lookup(java.lang.Long id)
|
ClonedServerEntry |
lookup(LookupOperationContext opContext)
Looks up an entry by distinguished/absolute name. |
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,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 |
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. |
abstract void |
setNdnIndexOn(Index<java.lang.String,ServerEntry> index)
Sets the normalized distinguished name Index. |
abstract 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. |
abstract void |
setOneLevelIndexOn(Index<java.lang.Long,ServerEntry> index)
Sets the one level Index. |
abstract void |
setPresenceIndexOn(Index<java.lang.String,ServerEntry> index)
Sets the attribute existance Index. |
abstract void |
setProperty(java.lang.String key,
java.lang.String value)
|
abstract void |
setRegistries(Registries registries)
Allows for schema entity registries to be swapped out during runtime. |
abstract 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. |
abstract void |
setUpdnIndexOn(Index<java.lang.String,ServerEntry> index)
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, getSuffixDn, getUpSuffixDn, init, setSuffix, unbind |
Field Detail |
---|
protected static final java.util.Set<java.lang.String> SYS_INDEX_OIDS
protected SearchEngine<ServerEntry> searchEngine
protected Optimizer optimizer
protected Registries registries
protected java.lang.String id
protected int cacheSize
protected org.apache.directory.shared.ldap.name.LdapDN suffixDn
protected java.lang.String suffix
protected ServerEntry contextEntry
Constructor Detail |
---|
protected BTreePartition()
Method Detail |
---|
public void setCacheSize(int cacheSize)
setCacheSize
in interface Partition
cacheSize
- the maximum size of the cache in the number of entriespublic int getCacheSize()
getCacheSize
in interface Partition
public java.lang.String getId()
getId
in interface Partition
public void setId(java.lang.String id)
setId
in interface Partition
id
- the unique identifier for this partitionpublic abstract void setRegistries(Registries registries) throws java.lang.Exception
registries
- the schema entity registries
java.lang.Exception
public SearchEngine<ServerEntry> getSearchEngine()
public void delete(DeleteOperationContext opContext) throws java.lang.Exception
Partition
delete
in interface Partition
opContext
- the context of the entry to
delete from this ContextPartition.
java.lang.Exception
- if there are any problemspublic abstract void add(AddOperationContext opContext) throws java.lang.Exception
Partition
add
in interface Partition
opContext
- the context used to add and entry to this ContextPartition
java.lang.Exception
- if there are any problemspublic abstract void modify(ModifyOperationContext opContext) throws java.lang.Exception
Partition
modify
in interface Partition
opContext
- 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 EntryFilteringCursor list(ListOperationContext opContext) throws java.lang.Exception
Partition
list
in interface Partition
opContext
- the context containing the distinguished/absolute name for the search/listing
ServerSearchResult
java.lang.Exception
- if there are any problemspublic EntryFilteringCursor search(SearchOperationContext opContext) throws java.lang.Exception
Partition
search
in interface Partition
opContext
- The context containing the information used by the operation
java.lang.Exception
- if there are any problemspublic ClonedServerEntry lookup(LookupOperationContext opContext) throws java.lang.Exception
Partition
lookup
in interface Partition
opContext
- The context containing the parameters
java.lang.Exception
- if there are any problemspublic boolean hasEntry(EntryOperationContext opContext) throws java.lang.Exception
Partition
hasEntry
in interface Partition
opContext
- The context used to pass informations
java.lang.Exception
- if there are any problemspublic abstract void rename(RenameOperationContext opContext) throws java.lang.Exception
Partition
rename
in interface Partition
opContext
- the modify DN context
java.lang.Exception
- if there are any problemspublic abstract void move(MoveOperationContext opContext) throws java.lang.Exception
Partition
move
in interface Partition
opContext
- The context containing the DNs to move
java.lang.Exception
- if there are any problemspublic abstract void moveAndRename(MoveAndRenameOperationContext opContext) throws java.lang.Exception
Partition
moveAndRename
in interface Partition
opContext
- The context contain all the information about
the modifyDN operation
java.lang.Exception
- if there are any problemspublic abstract void sync() throws java.lang.Exception
Partition
sync
in interface Partition
java.lang.Exception
- if buffers cannot be flushed to diskpublic abstract void destroy() throws java.lang.Exception
Partition
destroy
in interface Partition
java.lang.Exception
public abstract boolean isInitialized()
Partition
isInitialized
in interface Partition
public void inspect() throws java.lang.Exception
java.lang.Exception
public abstract void addIndexOn(Index<java.lang.Long,ServerEntry> index) throws java.lang.Exception
java.lang.Exception
public abstract boolean hasUserIndexOn(java.lang.String attribute) throws java.lang.Exception
java.lang.Exception
public abstract boolean hasSystemIndexOn(java.lang.String attribute) throws java.lang.Exception
java.lang.Exception
public abstract Index<java.lang.String,ServerEntry> getPresenceIndex()
public abstract Index<java.lang.Long,ServerEntry> getOneLevelIndex()
public abstract Index<java.lang.Long,ServerEntry> getSubLevelIndex()
public abstract Index<java.lang.String,ServerEntry> getUpdnIndex()
public abstract Index<java.lang.String,ServerEntry> getNdnIndex()
public abstract Index<java.lang.Long,ServerEntry> getOneAliasIndex()
public abstract Index<java.lang.Long,ServerEntry> getSubAliasIndex()
public abstract Index<java.lang.String,ServerEntry> getAliasIndex()
public abstract void setAliasIndexOn(Index<java.lang.String,ServerEntry> index) throws java.lang.Exception
index
- the index on the ALIAS_ATTRIBUTE
java.lang.Exception
- if there is a problem setting up the indexpublic abstract void setPresenceIndexOn(Index<java.lang.String,ServerEntry> index) throws java.lang.Exception
index
- the attribute existance Index
java.lang.Exception
- if there is a problem setting up the indexpublic abstract void setOneLevelIndexOn(Index<java.lang.Long,ServerEntry> index) throws java.lang.Exception
index
- the one level Index
java.lang.Exception
- if there is a problem setting up the indexpublic abstract void setUpdnIndexOn(Index<java.lang.String,ServerEntry> index) throws java.lang.Exception
index
- the updn Index
java.lang.Exception
- if there is a problem setting up the indexpublic abstract void setNdnIndexOn(Index<java.lang.String,ServerEntry> index) throws java.lang.Exception
index
- the ndn Index
java.lang.Exception
- if there is a problem setting up the indexpublic abstract void setOneAliasIndexOn(Index<java.lang.Long,ServerEntry> index) throws java.lang.Exception
index
- a one level alias index
java.lang.Exception
- if there is a problem setting up the indexpublic abstract void setSubAliasIndexOn(Index<java.lang.Long,ServerEntry> index) throws java.lang.Exception
index
- a subtree alias index
java.lang.Exception
- if there is a problem setting up the indexpublic abstract Index<?,ServerEntry> getUserIndex(java.lang.String attribute) throws java.lang.Exception
java.lang.Exception
public abstract Index<?,ServerEntry> getSystemIndex(java.lang.String attribute) throws java.lang.Exception
java.lang.Exception
public abstract java.lang.Long getEntryId(java.lang.String dn) throws java.lang.Exception
java.lang.Exception
public abstract java.lang.String getEntryDn(java.lang.Long id) throws java.lang.Exception
java.lang.Exception
public abstract java.lang.Long getParentId(java.lang.String dn) throws java.lang.Exception
java.lang.Exception
public abstract java.lang.Long getParentId(java.lang.Long childId) throws java.lang.Exception
java.lang.Exception
public abstract java.lang.String getEntryUpdn(java.lang.Long id) throws java.lang.Exception
id
- the entry id
java.lang.Exception
- if the updn index cannot be accessedpublic abstract java.lang.String getEntryUpdn(java.lang.String dn) throws java.lang.Exception
dn
- the normalized distinguished name
java.lang.Exception
- if the updn and ndn indices cannot be accessedpublic abstract ClonedServerEntry lookup(java.lang.Long id) throws java.lang.Exception
lookup
in interface Partition
java.lang.Exception
public abstract void delete(java.lang.Long id) throws java.lang.Exception
java.lang.Exception
public abstract IndexCursor<java.lang.Long,ServerEntry> list(java.lang.Long id) throws java.lang.Exception
java.lang.Exception
public abstract int getChildCount(java.lang.Long id) throws java.lang.Exception
java.lang.Exception
public abstract void setProperty(java.lang.String key, java.lang.String value) throws java.lang.Exception
java.lang.Exception
public abstract java.lang.String getProperty(java.lang.String key) throws java.lang.Exception
java.lang.Exception
public abstract java.util.Iterator<java.lang.String> getUserIndices()
public abstract java.util.Iterator<java.lang.String> getSystemIndices()
public abstract int count() throws java.lang.Exception
java.lang.Exception
- 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 |