|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.directory.server.core.api.partition.AbstractPartition
org.apache.directory.server.core.partition.impl.btree.AbstractBTreePartition<ID>
public abstract class AbstractBTreePartition<ID extends Comparable<ID>>
An abstract Partition that uses general BTree operations.
| Field Summary | |
|---|---|
protected org.apache.directory.shared.ldap.model.schema.AttributeType |
ALIASED_OBJECT_NAME_AT
|
protected Index<String,org.apache.directory.shared.ldap.model.entry.Entry,ID> |
aliasIdx
a system index on aliasedObjectName attribute |
protected int |
cacheSize
The Entry cache size for this partition |
static int |
DEFAULT_CACHE_SIZE
The default cache size is set to 10 000 objects |
protected org.apache.directory.shared.ldap.model.schema.AttributeType |
ENTRY_CSN_AT
|
protected org.apache.directory.shared.ldap.model.schema.AttributeType |
ENTRY_UUID_AT
|
protected Index<String,org.apache.directory.shared.ldap.model.entry.Entry,ID> |
entryCsnIdx
a system index on entryCSN attribute |
protected Index<String,org.apache.directory.shared.ldap.model.entry.Entry,ID> |
entryUuidIdx
a system index on entryUUID attribute |
protected AtomicBoolean |
isSyncOnWrite
true if we sync disks on every write operation |
protected MasterTable<ID,org.apache.directory.shared.ldap.model.entry.Entry> |
master
the master table storing entries by primary key |
protected org.apache.directory.shared.ldap.model.schema.AttributeType |
OBJECT_CLASS_AT
Cached attributes types to avoid lookup all over the code |
protected Index<String,org.apache.directory.shared.ldap.model.entry.Entry,ID> |
objectClassIdx
a system index on objectClass attribute |
protected Index<ID,org.apache.directory.shared.ldap.model.entry.Entry,ID> |
oneAliasIdx
the one level scope alias index |
protected Index<ID,org.apache.directory.shared.ldap.model.entry.Entry,ID> |
oneLevelIdx
the parent child relationship index |
protected Optimizer |
optimizer
The optimizer to use during search operation |
protected boolean |
optimizerEnabled
Tells if the Optimizer is enabled |
protected URI |
partitionPath
The path in which this Partition stores files |
protected Index<String,org.apache.directory.shared.ldap.model.entry.Entry,ID> |
presenceIdx
the attribute presence index |
protected Index<ParentIdAndRdn<ID>,org.apache.directory.shared.ldap.model.entry.Entry,ID> |
rdnIdx
the relative distinguished name index |
protected SearchEngine<org.apache.directory.shared.ldap.model.entry.Entry,ID> |
searchEngine
the search engine used to search the database |
protected Index<ID,org.apache.directory.shared.ldap.model.entry.Entry,ID> |
subAliasIdx
the subtree scope alias index |
protected Index<ID,org.apache.directory.shared.ldap.model.entry.Entry,ID> |
subLevelIdx
a system index on the entries of descendants of root Dn |
protected Map<String,Index<?,org.apache.directory.shared.ldap.model.entry.Entry,ID>> |
systemIndices
a map of attributeType numeric ID to system userIndices |
protected Map<String,Index<?,org.apache.directory.shared.ldap.model.entry.Entry,ID>> |
userIndices
a map of attributeType numeric ID to user userIndices |
| Fields inherited from class org.apache.directory.server.core.api.partition.AbstractPartition |
|---|
id, initialized, schemaManager, suffixDn |
| Fields inherited from interface org.apache.directory.server.xdbm.Store |
|---|
SYS_INDEX_OID_ARRAY, SYS_INDEX_OIDS |
| Constructor Summary | |
|---|---|
protected |
AbstractBTreePartition(org.apache.directory.shared.ldap.model.schema.SchemaManager schemaManager)
Creates a B-tree based context partition. |
| Method Summary | |
|---|---|
void |
add(org.apache.directory.server.core.api.interceptor.context.AddOperationContext addContext)
|
protected void |
addAliasIndices(ID aliasId,
org.apache.directory.shared.ldap.model.name.Dn aliasDn,
String aliasTarget)
Adds userIndices for an aliasEntry to be added to the database while checking for constrained alias constructs like alias cycles and chaining. |
void |
addIndex(Index<?,org.apache.directory.shared.ldap.model.entry.Entry,ID> index)
Adds a (system or user) index to the list of index for this store. |
void |
addIndexedAttributes(Index<?,org.apache.directory.shared.ldap.model.entry.Entry,ID>... indexes)
Add some new indexes |
protected org.apache.directory.shared.ldap.model.name.Dn |
buildEntryDn(ID id)
builds the Dn of the entry identified by the given id |
protected abstract Index<?,org.apache.directory.shared.ldap.model.entry.Entry,ID> |
convertAndInit(Index<?,org.apache.directory.shared.ldap.model.entry.Entry,ID> index)
Convert and initialize an index for a specific store implementation. |
int |
count()
Gets the total count of entries within this store. |
void |
delete(org.apache.directory.server.core.api.interceptor.context.DeleteOperationContext deleteContext)
|
void |
delete(ID id)
Delete the entry associated with a given Id |
protected void |
doDestroy()
|
protected void |
doInit()
|
protected void |
dropAliasIndices(ID aliasId)
Removes the index entries for an alias before the entry is deleted from the master table. |
protected void |
dropAliasIndices(ID aliasId,
org.apache.directory.shared.ldap.model.name.Dn movedBase)
For the alias id all ancestor one and subtree alias tuples are moved above the moved base. |
protected void |
dropMovedAliasIndices(org.apache.directory.shared.ldap.model.name.Dn movedBase)
For all aliases including and under the moved base, this method removes one and subtree alias index tuples for old ancestors above the moved base that will no longer be ancestors after the move. |
void |
dumpIndex(OutputStream stream,
String name)
|
Index<String,org.apache.directory.shared.ldap.model.entry.Entry,ID> |
getAliasIndex()
|
int |
getCacheSize()
Gets the entry cache size for this BTreePartition. |
int |
getChildCount(ID id)
Gets the count of immediate children of the given entry ID. |
abstract ID |
getDefaultId()
Gets the default ID. |
Index<String,org.apache.directory.shared.ldap.model.entry.Entry,ID> |
getEntryCsnIndex()
|
org.apache.directory.shared.ldap.model.name.Dn |
getEntryDn(ID id)
Gets the Entry's Dn identified by the given id. |
ID |
getEntryId(org.apache.directory.shared.ldap.model.name.Dn dn)
Gets the entry's id. |
Index<String,org.apache.directory.shared.ldap.model.entry.Entry,ID> |
getEntryUuidIndex()
|
Index<?,org.apache.directory.shared.ldap.model.entry.Entry,ID> |
getIndex(org.apache.directory.shared.ldap.model.schema.AttributeType attributeType)
Get the user or system index associated with the given attributeType |
Set<Index<?,org.apache.directory.shared.ldap.model.entry.Entry,ID>> |
getIndexedAttributes()
|
Index<String,org.apache.directory.shared.ldap.model.entry.Entry,ID> |
getObjectClassIndex()
|
Index<ID,org.apache.directory.shared.ldap.model.entry.Entry,ID> |
getOneAliasIndex()
|
Index<ID,org.apache.directory.shared.ldap.model.entry.Entry,ID> |
getOneLevelIndex()
|
ID |
getParentId(ID childId)
Gets the ID of an entry's parent using the child entry's ID. |
URI |
getPartitionPath()
Gets the path in which this Partition stores data. |
Index<String,org.apache.directory.shared.ldap.model.entry.Entry,ID> |
getPresenceIndex()
|
Index<ParentIdAndRdn<ID>,org.apache.directory.shared.ldap.model.entry.Entry,ID> |
getRdnIndex()
|
abstract ID |
getRootId()
Gets the root ID of this store implementation. |
SearchEngine<org.apache.directory.shared.ldap.model.entry.Entry,ID> |
getSearchEngine()
Gets the DefaultSearchEngine used by this ContextPartition to search the Database. |
Index<ID,org.apache.directory.shared.ldap.model.entry.Entry,ID> |
getSubAliasIndex()
|
Index<ID,org.apache.directory.shared.ldap.model.entry.Entry,ID> |
getSubLevelIndex()
|
protected ID |
getSuffixId()
Retrieve the SuffixID |
Index<?,org.apache.directory.shared.ldap.model.entry.Entry,ID> |
getSystemIndex(org.apache.directory.shared.ldap.model.schema.AttributeType attributeType)
Get the system index associated with the given name |
Iterator<String> |
getSystemIndices()
An iterator build on top of the System's index |
Index<?,org.apache.directory.shared.ldap.model.entry.Entry,ID> |
getUserIndex(org.apache.directory.shared.ldap.model.schema.AttributeType attributeType)
Get the user index associated with the given name |
Iterator<String> |
getUserIndices()
An iterator build on top of the User's index |
boolean |
hasEntry(org.apache.directory.server.core.api.interceptor.context.HasEntryOperationContext entryContext)
This method calls Partition.lookup(LookupOperationContext) and return true
if it returns an entry by default. |
boolean |
hasIndexOn(org.apache.directory.shared.ldap.model.schema.AttributeType attributeType)
Tells if an index is already present in the User's or System's index list |
boolean |
hasSystemIndexOn(org.apache.directory.shared.ldap.model.schema.AttributeType attributeType)
Tells if an index is already present in the System's index list |
boolean |
hasUserIndexOn(org.apache.directory.shared.ldap.model.schema.AttributeType attributeType)
Tells if an index is already present in the User's index list |
boolean |
isOptimizerEnabled()
Tells if the Optimizer is enabled or not |
boolean |
isSyncOnWrite()
|
IndexCursor<ID,org.apache.directory.shared.ldap.model.entry.Entry,ID> |
list(ID id)
Gets an IndexEntry Cursor over the child nodes of an entry. |
org.apache.directory.server.core.api.filtering.EntryFilteringCursor |
list(org.apache.directory.server.core.api.interceptor.context.ListOperationContext listContext)
|
org.apache.directory.shared.ldap.model.entry.Entry |
lookup(ID id)
Get back an entry knowing its ID |
org.apache.directory.shared.ldap.model.entry.Entry |
lookup(org.apache.directory.server.core.api.interceptor.context.LookupOperationContext lookupContext)
|
org.apache.directory.shared.ldap.model.entry.Entry |
modify(org.apache.directory.shared.ldap.model.name.Dn dn,
org.apache.directory.shared.ldap.model.entry.Modification... mods)
Modify an entry applying the given list of modifications. |
void |
modify(org.apache.directory.server.core.api.interceptor.context.ModifyOperationContext modifyContext)
|
void |
move(org.apache.directory.shared.ldap.model.name.Dn oldDn,
org.apache.directory.shared.ldap.model.name.Dn newSuperiorDn,
org.apache.directory.shared.ldap.model.name.Dn newDn,
org.apache.directory.shared.ldap.model.entry.Entry modifiedEntry)
Move an entry from one place to the other. |
void |
move(org.apache.directory.server.core.api.interceptor.context.MoveOperationContext moveContext)
|
void |
moveAndRename(org.apache.directory.shared.ldap.model.name.Dn oldDn,
org.apache.directory.shared.ldap.model.name.Dn newSuperiorDn,
org.apache.directory.shared.ldap.model.name.Rdn newRdn,
org.apache.directory.shared.ldap.model.entry.Entry modifiedEntry,
boolean deleteOldRdn)
|
void |
moveAndRename(org.apache.directory.server.core.api.interceptor.context.MoveAndRenameOperationContext moveAndRenameContext)
|
void |
rename(org.apache.directory.shared.ldap.model.name.Dn dn,
org.apache.directory.shared.ldap.model.name.Rdn newRdn,
boolean deleteOldRdn,
org.apache.directory.shared.ldap.model.entry.Entry entry)
Changes the relative distinguished name of an entry specified by a distinguished name with the optional removal of the old Rdn attribute value from the entry. |
void |
rename(org.apache.directory.server.core.api.interceptor.context.RenameOperationContext renameContext)
|
org.apache.directory.server.core.api.filtering.EntryFilteringCursor |
search(org.apache.directory.server.core.api.interceptor.context.SearchOperationContext searchContext)
|
void |
setCacheSize(int cacheSize)
Used to specify the entry cache size for a Partition. |
void |
setIndexedAttributes(Set<Index<?,org.apache.directory.shared.ldap.model.entry.Entry,ID>> indexedAttributes)
Set the list of indexes for this partition |
void |
setOptimizerEnabled(boolean optimizerEnabled)
Set the optimizer flag |
void |
setPartitionPath(URI partitionPath)
Sets the path in which this Partition stores data. |
void |
setSyncOnWrite(boolean isSyncOnWrite)
Sets the flag telling the server to flush on disk when some modification has been done. |
protected void |
setupSystemIndices()
Sets up the system indices. |
protected void |
setupUserIndices()
Sets up the user indices. |
String |
toString()
|
void |
unbind(org.apache.directory.server.core.api.interceptor.context.UnbindOperationContext unbindContext)
|
| Methods inherited from class org.apache.directory.server.core.api.partition.AbstractPartition |
|---|
checkInitialized, destroy, getId, getSchemaManager, getSuffixDn, initialize, isInitialized, setId, setSchemaManager, setSuffixDn |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.apache.directory.server.core.api.partition.Partition |
|---|
sync |
| Field Detail |
|---|
protected SearchEngine<org.apache.directory.shared.ldap.model.entry.Entry,ID extends Comparable<ID>> searchEngine
protected Optimizer optimizer
protected boolean optimizerEnabled
public static final int DEFAULT_CACHE_SIZE
protected int cacheSize
protected AtomicBoolean isSyncOnWrite
protected URI partitionPath
protected MasterTable<ID extends Comparable<ID>,org.apache.directory.shared.ldap.model.entry.Entry> master
protected Map<String,Index<?,org.apache.directory.shared.ldap.model.entry.Entry,ID extends Comparable<ID>>> userIndices
protected Map<String,Index<?,org.apache.directory.shared.ldap.model.entry.Entry,ID extends Comparable<ID>>> systemIndices
protected Index<ParentIdAndRdn<ID extends Comparable<ID>>,org.apache.directory.shared.ldap.model.entry.Entry,ID extends Comparable<ID>> rdnIdx
protected Index<String,org.apache.directory.shared.ldap.model.entry.Entry,ID extends Comparable<ID>> objectClassIdx
protected Index<ID extends Comparable<ID>,org.apache.directory.shared.ldap.model.entry.Entry,ID extends Comparable<ID>> oneLevelIdx
protected Index<ID extends Comparable<ID>,org.apache.directory.shared.ldap.model.entry.Entry,ID extends Comparable<ID>> subLevelIdx
protected Index<String,org.apache.directory.shared.ldap.model.entry.Entry,ID extends Comparable<ID>> presenceIdx
protected Index<String,org.apache.directory.shared.ldap.model.entry.Entry,ID extends Comparable<ID>> entryUuidIdx
protected Index<String,org.apache.directory.shared.ldap.model.entry.Entry,ID extends Comparable<ID>> entryCsnIdx
protected Index<String,org.apache.directory.shared.ldap.model.entry.Entry,ID extends Comparable<ID>> aliasIdx
protected Index<ID extends Comparable<ID>,org.apache.directory.shared.ldap.model.entry.Entry,ID extends Comparable<ID>> subAliasIdx
protected Index<ID extends Comparable<ID>,org.apache.directory.shared.ldap.model.entry.Entry,ID extends Comparable<ID>> oneAliasIdx
protected org.apache.directory.shared.ldap.model.schema.AttributeType OBJECT_CLASS_AT
protected org.apache.directory.shared.ldap.model.schema.AttributeType ENTRY_CSN_AT
protected org.apache.directory.shared.ldap.model.schema.AttributeType ENTRY_UUID_AT
protected org.apache.directory.shared.ldap.model.schema.AttributeType ALIASED_OBJECT_NAME_AT
| Constructor Detail |
|---|
protected AbstractBTreePartition(org.apache.directory.shared.ldap.model.schema.SchemaManager schemaManager)
| Method Detail |
|---|
public int getCacheSize()
getCacheSize in interface Store<org.apache.directory.shared.ldap.model.entry.Entry,ID extends Comparable<ID>>public void setCacheSize(int cacheSize)
setCacheSize in interface Store<org.apache.directory.shared.ldap.model.entry.Entry,ID extends Comparable<ID>>cacheSize - the maximum size of the cache in the number of entriespublic boolean isOptimizerEnabled()
public void setOptimizerEnabled(boolean optimizerEnabled)
optimizerEnabled - The flagpublic void setPartitionPath(URI partitionPath)
setPartitionPath in interface Store<org.apache.directory.shared.ldap.model.entry.Entry,ID extends Comparable<ID>>partitionDir - the path in which this Partition stores data.public boolean isSyncOnWrite()
isSyncOnWrite in interface Store<org.apache.directory.shared.ldap.model.entry.Entry,ID extends Comparable<ID>>true if we write to disk for every modificationpublic void setSyncOnWrite(boolean isSyncOnWrite)
setSyncOnWrite in interface Store<org.apache.directory.shared.ldap.model.entry.Entry,ID extends Comparable<ID>>isSyncOnWrite - A boolean set to true if we have to flush on disk
when a modification occurs
protected void setupSystemIndices()
throws Exception
Exception
protected void setupUserIndices()
throws Exception
Exceptionpublic SearchEngine<org.apache.directory.shared.ldap.model.entry.Entry,ID> getSearchEngine()
public abstract ID getDefaultId()
getDefaultId in interface Store<org.apache.directory.shared.ldap.model.entry.Entry,ID extends Comparable<ID>>public abstract ID getRootId()
getRootId in interface Store<org.apache.directory.shared.ldap.model.entry.Entry,ID extends Comparable<ID>>
protected abstract Index<?,org.apache.directory.shared.ldap.model.entry.Entry,ID> convertAndInit(Index<?,org.apache.directory.shared.ldap.model.entry.Entry,ID> index)
throws Exception
index - the index
Exceptionpublic URI getPartitionPath()
getPartitionPath in interface Store<org.apache.directory.shared.ldap.model.entry.Entry,ID extends Comparable<ID>>
protected void doDestroy()
throws org.apache.directory.shared.ldap.model.exception.LdapException,
Exception
doDestroy in class org.apache.directory.server.core.api.partition.AbstractPartitionorg.apache.directory.shared.ldap.model.exception.LdapException
Exception
protected void doInit()
throws Exception
doInit in class org.apache.directory.server.core.api.partition.AbstractPartitionException
public void add(org.apache.directory.server.core.api.interceptor.context.AddOperationContext addContext)
throws org.apache.directory.shared.ldap.model.exception.LdapException
add in interface org.apache.directory.server.core.api.partition.Partitionorg.apache.directory.shared.ldap.model.exception.LdapException
public void delete(org.apache.directory.server.core.api.interceptor.context.DeleteOperationContext deleteContext)
throws org.apache.directory.shared.ldap.model.exception.LdapException
delete in interface org.apache.directory.server.core.api.partition.Partitionorg.apache.directory.shared.ldap.model.exception.LdapException
public void delete(ID id)
throws org.apache.directory.shared.ldap.model.exception.LdapException
delete in interface Store<org.apache.directory.shared.ldap.model.entry.Entry,ID extends Comparable<ID>>id - The id of the entry to delete
Exception - If the deletion failed
org.apache.directory.shared.ldap.model.exception.LdapException
public org.apache.directory.server.core.api.filtering.EntryFilteringCursor list(org.apache.directory.server.core.api.interceptor.context.ListOperationContext listContext)
throws org.apache.directory.shared.ldap.model.exception.LdapException
list in interface org.apache.directory.server.core.api.partition.Partitionorg.apache.directory.shared.ldap.model.exception.LdapException
public final IndexCursor<ID,org.apache.directory.shared.ldap.model.entry.Entry,ID> list(ID id)
throws org.apache.directory.shared.ldap.model.exception.LdapException
list in interface Store<org.apache.directory.shared.ldap.model.entry.Entry,ID extends Comparable<ID>>id - the id of the parent entry
org.apache.directory.shared.ldap.model.exception.LdapException
public org.apache.directory.server.core.api.filtering.EntryFilteringCursor search(org.apache.directory.server.core.api.interceptor.context.SearchOperationContext searchContext)
throws org.apache.directory.shared.ldap.model.exception.LdapException
search in interface org.apache.directory.server.core.api.partition.Partitionorg.apache.directory.shared.ldap.model.exception.LdapException
public org.apache.directory.shared.ldap.model.entry.Entry lookup(org.apache.directory.server.core.api.interceptor.context.LookupOperationContext lookupContext)
throws org.apache.directory.shared.ldap.model.exception.LdapException
lookup in interface org.apache.directory.server.core.api.partition.Partitionorg.apache.directory.shared.ldap.model.exception.LdapException
public org.apache.directory.shared.ldap.model.entry.Entry lookup(ID id)
throws org.apache.directory.shared.ldap.model.exception.LdapException
lookup in interface Store<org.apache.directory.shared.ldap.model.entry.Entry,ID extends Comparable<ID>>id - The Entry ID we want to get back
Exception - If the lookup failed for any reason (except a not found entry)
org.apache.directory.shared.ldap.model.exception.LdapException
public void modify(org.apache.directory.server.core.api.interceptor.context.ModifyOperationContext modifyContext)
throws org.apache.directory.shared.ldap.model.exception.LdapException
modify in interface org.apache.directory.server.core.api.partition.Partitionorg.apache.directory.shared.ldap.model.exception.LdapException
public final org.apache.directory.shared.ldap.model.entry.Entry modify(org.apache.directory.shared.ldap.model.name.Dn dn,
org.apache.directory.shared.ldap.model.entry.Modification... mods)
throws Exception
modify in interface Store<org.apache.directory.shared.ldap.model.entry.Entry,ID extends Comparable<ID>>dn - The Entry's Dnmods - The list of modifications
Exception - If the modification failed
public void move(org.apache.directory.server.core.api.interceptor.context.MoveOperationContext moveContext)
throws org.apache.directory.shared.ldap.model.exception.LdapException
move in interface org.apache.directory.server.core.api.partition.Partitionorg.apache.directory.shared.ldap.model.exception.LdapException
public final void move(org.apache.directory.shared.ldap.model.name.Dn oldDn,
org.apache.directory.shared.ldap.model.name.Dn newSuperiorDn,
org.apache.directory.shared.ldap.model.name.Dn newDn,
org.apache.directory.shared.ldap.model.entry.Entry modifiedEntry)
throws Exception
Move an entry from one place to the other. The Rdn remains unchanged, the parent Dn changes
We have to update some of the index when moving an entry. Assuming that the target destination does not exist, the following index must be updated :
If the moved entry is an alias, then we also have to update the following index :
The Alias index is not updated, as the entry ID won't change.
We have a few check we must do before moving the entry :
move in interface Store<org.apache.directory.shared.ldap.model.entry.Entry,ID extends Comparable<ID>>oldDn - The previous entry DnnewSuperiorDn - The new superior DnnewDn - The new DnmodifiedEntry - The entry to move
Exception - If the move failed
public void moveAndRename(org.apache.directory.server.core.api.interceptor.context.MoveAndRenameOperationContext moveAndRenameContext)
throws org.apache.directory.shared.ldap.model.exception.LdapException
moveAndRename in interface org.apache.directory.server.core.api.partition.Partitionorg.apache.directory.shared.ldap.model.exception.LdapException
public final void moveAndRename(org.apache.directory.shared.ldap.model.name.Dn oldDn,
org.apache.directory.shared.ldap.model.name.Dn newSuperiorDn,
org.apache.directory.shared.ldap.model.name.Rdn newRdn,
org.apache.directory.shared.ldap.model.entry.Entry modifiedEntry,
boolean deleteOldRdn)
throws Exception
moveAndRename in interface Store<org.apache.directory.shared.ldap.model.entry.Entry,ID extends Comparable<ID>>Exception
public void rename(org.apache.directory.server.core.api.interceptor.context.RenameOperationContext renameContext)
throws org.apache.directory.shared.ldap.model.exception.LdapException
rename in interface org.apache.directory.server.core.api.partition.Partitionorg.apache.directory.shared.ldap.model.exception.LdapException
public final void rename(org.apache.directory.shared.ldap.model.name.Dn dn,
org.apache.directory.shared.ldap.model.name.Rdn newRdn,
boolean deleteOldRdn,
org.apache.directory.shared.ldap.model.entry.Entry entry)
throws Exception
rename in interface Store<org.apache.directory.shared.ldap.model.entry.Entry,ID extends Comparable<ID>>dn - the normalized distinguished name of the entry to alternewRdn - the new Rdn to setdeleteOldRdn - whether or not to remove the old Rdn attr/valentry - the modified entry
Exception - if there are any errors propagating the name changes
public final void unbind(org.apache.directory.server.core.api.interceptor.context.UnbindOperationContext unbindContext)
throws org.apache.directory.shared.ldap.model.exception.LdapException
unbind in interface org.apache.directory.server.core.api.partition.Partitionorg.apache.directory.shared.ldap.model.exception.LdapException
public boolean hasEntry(org.apache.directory.server.core.api.interceptor.context.HasEntryOperationContext entryContext)
throws org.apache.directory.shared.ldap.model.exception.LdapException
Partition.lookup(LookupOperationContext) and return true
if it returns an entry by default. Please override this method if
there is more effective way for your implementation.
hasEntry in interface org.apache.directory.server.core.api.partition.Partitionorg.apache.directory.shared.ldap.model.exception.LdapException
protected org.apache.directory.shared.ldap.model.name.Dn buildEntryDn(ID id)
throws Exception
id - the entry's id
Exception
public int count()
throws Exception
count in interface Store<org.apache.directory.shared.ldap.model.entry.Entry,ID extends Comparable<ID>>Exception - on failures to access the underlying store
public final int getChildCount(ID id)
throws org.apache.directory.shared.ldap.model.exception.LdapException
getChildCount in interface Store<org.apache.directory.shared.ldap.model.entry.Entry,ID extends Comparable<ID>>id - the entry ID
org.apache.directory.shared.ldap.model.exception.LdapException
public final org.apache.directory.shared.ldap.model.name.Dn getEntryDn(ID id)
throws Exception
getEntryDn in interface Store<org.apache.directory.shared.ldap.model.entry.Entry,ID extends Comparable<ID>>id - the entry's id
Exception
public final ID getEntryId(org.apache.directory.shared.ldap.model.name.Dn dn)
throws org.apache.directory.shared.ldap.model.exception.LdapException
null if the Dn doesn't exist in this store.
Note that the Dn must be normalized!
getEntryId in interface Store<org.apache.directory.shared.ldap.model.entry.Entry,ID extends Comparable<ID>>dn - the normalized entry Dn
null if the Dn doesn't exists
org.apache.directory.shared.ldap.model.exception.LdapException
public ID getParentId(ID childId)
throws Exception
getParentId in interface Store<org.apache.directory.shared.ldap.model.entry.Entry,ID extends Comparable<ID>>childId - the ID of the entry
Exception - on failures to access the underlying store
protected ID getSuffixId()
throws Exception
Exception
public void addIndex(Index<?,org.apache.directory.shared.ldap.model.entry.Entry,ID> index)
throws Exception
addIndex in interface Store<org.apache.directory.shared.ldap.model.entry.Entry,ID extends Comparable<ID>>index - The index to add
Exception - If the addition failedpublic void addIndexedAttributes(Index<?,org.apache.directory.shared.ldap.model.entry.Entry,ID>... indexes)
indexes - The added indexespublic void setIndexedAttributes(Set<Index<?,org.apache.directory.shared.ldap.model.entry.Entry,ID>> indexedAttributes)
indexedAttributes - The list of indexespublic Set<Index<?,org.apache.directory.shared.ldap.model.entry.Entry,ID>> getIndexedAttributes()
public Iterator<String> getUserIndices()
getUserIndices in interface Store<org.apache.directory.shared.ldap.model.entry.Entry,ID extends Comparable<ID>>public Iterator<String> getSystemIndices()
getSystemIndices in interface Store<org.apache.directory.shared.ldap.model.entry.Entry,ID extends Comparable<ID>>
public Index<?,org.apache.directory.shared.ldap.model.entry.Entry,ID> getIndex(org.apache.directory.shared.ldap.model.schema.AttributeType attributeType)
throws IndexNotFoundException
getIndex in interface Store<org.apache.directory.shared.ldap.model.entry.Entry,ID extends Comparable<ID>>attributeType - The index attributeType we are looking for
IndexNotFoundException - If the index does not exist
public Index<?,org.apache.directory.shared.ldap.model.entry.Entry,ID> getUserIndex(org.apache.directory.shared.ldap.model.schema.AttributeType attributeType)
throws IndexNotFoundException
getUserIndex in interface Store<org.apache.directory.shared.ldap.model.entry.Entry,ID extends Comparable<ID>>attributeType - The index name we are looking for
IndexNotFoundException - If the index does not exist
public Index<?,org.apache.directory.shared.ldap.model.entry.Entry,ID> getSystemIndex(org.apache.directory.shared.ldap.model.schema.AttributeType attributeType)
throws IndexNotFoundException
getSystemIndex in interface Store<org.apache.directory.shared.ldap.model.entry.Entry,ID extends Comparable<ID>>attributeType - The index name we are looking for
IndexNotFoundException - If the index does not existpublic Index<ID,org.apache.directory.shared.ldap.model.entry.Entry,ID> getOneLevelIndex()
getOneLevelIndex in interface Store<org.apache.directory.shared.ldap.model.entry.Entry,ID extends Comparable<ID>>public Index<ID,org.apache.directory.shared.ldap.model.entry.Entry,ID> getSubLevelIndex()
getSubLevelIndex in interface Store<org.apache.directory.shared.ldap.model.entry.Entry,ID extends Comparable<ID>>public Index<String,org.apache.directory.shared.ldap.model.entry.Entry,ID> getAliasIndex()
getAliasIndex in interface Store<org.apache.directory.shared.ldap.model.entry.Entry,ID extends Comparable<ID>>public Index<ID,org.apache.directory.shared.ldap.model.entry.Entry,ID> getOneAliasIndex()
getOneAliasIndex in interface Store<org.apache.directory.shared.ldap.model.entry.Entry,ID extends Comparable<ID>>public Index<ID,org.apache.directory.shared.ldap.model.entry.Entry,ID> getSubAliasIndex()
getSubAliasIndex in interface Store<org.apache.directory.shared.ldap.model.entry.Entry,ID extends Comparable<ID>>public Index<String,org.apache.directory.shared.ldap.model.entry.Entry,ID> getObjectClassIndex()
getObjectClassIndex in interface Store<org.apache.directory.shared.ldap.model.entry.Entry,ID extends Comparable<ID>>public Index<String,org.apache.directory.shared.ldap.model.entry.Entry,ID> getEntryUuidIndex()
getEntryUuidIndex in interface Store<org.apache.directory.shared.ldap.model.entry.Entry,ID extends Comparable<ID>>public Index<String,org.apache.directory.shared.ldap.model.entry.Entry,ID> getEntryCsnIndex()
getEntryCsnIndex in interface Store<org.apache.directory.shared.ldap.model.entry.Entry,ID extends Comparable<ID>>public Index<String,org.apache.directory.shared.ldap.model.entry.Entry,ID> getPresenceIndex()
getPresenceIndex in interface Store<org.apache.directory.shared.ldap.model.entry.Entry,ID extends Comparable<ID>>public Index<ParentIdAndRdn<ID>,org.apache.directory.shared.ldap.model.entry.Entry,ID> getRdnIndex()
getRdnIndex in interface Store<org.apache.directory.shared.ldap.model.entry.Entry,ID extends Comparable<ID>>
public boolean hasUserIndexOn(org.apache.directory.shared.ldap.model.schema.AttributeType attributeType)
throws org.apache.directory.shared.ldap.model.exception.LdapException
hasUserIndexOn in interface Store<org.apache.directory.shared.ldap.model.entry.Entry,ID extends Comparable<ID>>attributeType - The attributeType index we are looking for
true if the index is already present in the
User's index list
org.apache.directory.shared.ldap.model.exception.LdapException
public boolean hasSystemIndexOn(org.apache.directory.shared.ldap.model.schema.AttributeType attributeType)
throws org.apache.directory.shared.ldap.model.exception.LdapException
hasSystemIndexOn in interface Store<org.apache.directory.shared.ldap.model.entry.Entry,ID extends Comparable<ID>>attributeType - The index we are looking for
true if the index is already present in the
System's index list
org.apache.directory.shared.ldap.model.exception.LdapException
public boolean hasIndexOn(org.apache.directory.shared.ldap.model.schema.AttributeType attributeType)
throws org.apache.directory.shared.ldap.model.exception.LdapException
hasIndexOn in interface Store<org.apache.directory.shared.ldap.model.entry.Entry,ID extends Comparable<ID>>true if the index is already present in the
User's or System's index list
org.apache.directory.shared.ldap.model.exception.LdapException
protected void addAliasIndices(ID aliasId,
org.apache.directory.shared.ldap.model.name.Dn aliasDn,
String aliasTarget)
throws Exception
aliasDn - normalized distinguished name for the alias entryaliasTarget - the user provided aliased entry dn as a stringaliasId - the id of alias entry to add
org.apache.directory.shared.ldap.model.exception.LdapException - if index addition fails, and if the alias is
not allowed due to chaining or cycle formation.
Exception - if the wrappedCursor btrees cannot be altered
protected void dropAliasIndices(ID aliasId)
throws Exception
aliasId - the id of the alias entry in the master table
org.apache.directory.shared.ldap.model.exception.LdapException - if we cannot parse ldap names
Exception - if we cannot delete index values in the database
protected void dropMovedAliasIndices(org.apache.directory.shared.ldap.model.name.Dn movedBase)
throws Exception
movedBase - the base at which the move occurred - the moved node
Exception - if system userIndices fail
protected void dropAliasIndices(ID aliasId,
org.apache.directory.shared.ldap.model.name.Dn movedBase)
throws Exception
aliasId - the id of the aliasmovedBase - the base where the move occurred
Exception - if userIndices fail
public void dumpIndex(OutputStream stream,
String name)
throws IOException
dumpIndex in interface org.apache.directory.server.core.api.partition.PartitiondumpIndex in class org.apache.directory.server.core.api.partition.AbstractPartitionIOExceptionpublic String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||