public abstract class AbstractBTreePartition extends org.apache.directory.server.core.api.partition.AbstractPartition implements Store
Partition that uses general BTree operations.| Modifier and Type | Field and Description |
|---|---|
protected static boolean |
ADD_CHILD |
protected org.apache.directory.api.ldap.model.schema.AttributeType |
ADMINISTRATIVE_ROLE_AT |
protected Index<String,String> |
adminRoleIdx
a system index on administrativeRole attribute
|
protected net.sf.ehcache.Cache |
aliasCache
The alias cache
|
protected org.apache.directory.api.ldap.model.schema.AttributeType |
ALIASED_OBJECT_NAME_AT |
protected Index<org.apache.directory.api.ldap.model.name.Dn,String> |
aliasIdx
a system index on aliasedObjectName attribute
|
protected int |
cacheSize
The Entry cache size for this partition
|
protected org.apache.directory.api.ldap.model.schema.AttributeType |
CONTEXT_CSN_AT |
static int |
DEFAULT_CACHE_SIZE
The default cache size is set to 10 000 objects
|
protected org.apache.directory.api.ldap.model.schema.AttributeType |
ENTRY_CSN_AT |
protected org.apache.directory.api.ldap.model.schema.AttributeType |
ENTRY_DN_AT |
protected org.apache.directory.api.ldap.model.schema.AttributeType |
ENTRY_UUID_AT |
protected Index<String,String> |
entryCsnIdx
a system index on entryCSN attribute
|
protected AtomicBoolean |
isSyncOnWrite
true if we sync disks on every write operation
|
protected MasterTable |
master
the master table storing entries by primary key
|
protected org.apache.directory.api.ldap.model.schema.AttributeType |
OBJECT_CLASS_AT
Cached attributes types to avoid lookup all over the code
|
protected Index<String,String> |
objectClassIdx
a system index on objectClass attribute
|
protected Index<String,String> |
oneAliasIdx
the one level scope alias index
|
protected boolean |
optimizerEnabled
Tells if the Optimizer is enabled
|
protected URI |
partitionPath
The path in which this Partition stores files
|
protected net.sf.ehcache.Cache |
piarCache
The ParentIdAndRdn cache
|
protected Index<String,String> |
presenceIdx
the attribute presence index
|
protected Index<ParentIdAndRdn,String> |
rdnIdx
the relative distinguished name index
|
protected static boolean |
REMOVE_CHILD |
protected Index<String,String> |
subAliasIdx
the subtree scope alias index
|
protected Map<String,Index<?,String>> |
systemIndices
a map of attributeType numeric UUID to system userIndices
|
protected Map<String,Index<?,String>> |
userIndices
a map of attributeType numeric UUID to user userIndices
|
cacheService, contextEntry, ctxCsnChanged, dnFactory, id, initialized, schemaManager, suffixDnSYS_INDEX_OID_ARRAY, SYS_INDEX_OIDS| Modifier | Constructor and Description |
|---|---|
protected |
AbstractBTreePartition(org.apache.directory.api.ldap.model.schema.SchemaManager schemaManager)
Creates a B-tree based context partition.
|
protected |
AbstractBTreePartition(org.apache.directory.api.ldap.model.schema.SchemaManager schemaManager,
org.apache.directory.server.core.api.DnFactory dnFactory)
Creates a B-tree based context partition.
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(org.apache.directory.server.core.api.interceptor.context.AddOperationContext addContext) |
protected void |
addAliasIndices(String aliasId,
org.apache.directory.api.ldap.model.name.Dn aliasDn,
org.apache.directory.api.ldap.model.name.Dn 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<?,String> index)
Adds a (system or user) index to the list of index for this store.
|
void |
addIndexedAttributes(Index<?,String>... indexes)
Add some new indexes
|
void |
addToCache(String id,
org.apache.directory.api.ldap.model.entry.Entry entry)
adds the given entry to cache
Note: this method is not called during add operation to avoid filling the cache
with all the added entries
|
protected org.apache.directory.api.ldap.model.name.Dn |
buildEntryDn(String id)
builds the Dn of the entry identified by the given id
|
protected abstract Index<?,String> |
convertAndInit(Index<?,String> index)
Convert and initialize an index for a specific store implementation.
|
long |
count()
Gets the total count of entries within this store.
|
protected abstract Index |
createSystemIndex(String indexOid,
URI path,
boolean withReverse)
Create a new Index for a given OID
|
org.apache.directory.api.ldap.model.entry.Entry |
delete(org.apache.directory.server.core.api.interceptor.context.DeleteOperationContext deleteContext) |
org.apache.directory.api.ldap.model.entry.Entry |
delete(String id)
Delete the entry associated with a given Id
|
protected void |
doDestroy() |
protected void |
doInit() |
protected void |
dropAliasIndices(String aliasId)
Removes the index entries for an alias before the entry is deleted from
the master table.
|
protected void |
dropMovedAliasIndices(org.apache.directory.api.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) |
void |
dumpRdnIdx(String id,
String tabs) |
org.apache.directory.api.ldap.model.entry.Entry |
fetch(String id)
Get back an entry knowing its UUID
|
org.apache.directory.api.ldap.model.entry.Entry |
fetch(String id,
org.apache.directory.api.ldap.model.name.Dn dn)
Get back an entry knowing its UUID
|
Index<String,String> |
getAdministrativeRoleIndex() |
net.sf.ehcache.Cache |
getAliasCache() |
Index<org.apache.directory.api.ldap.model.name.Dn,String> |
getAliasIndex() |
int |
getCacheSize()
Gets the entry cache size for this BTreePartition.
|
long |
getChildCount(String id)
Gets the count of immediate children of the given entry UUID.
|
String |
getContextCsn() |
Index<String,String> |
getEntryCsnIndex() |
org.apache.directory.api.ldap.model.name.Dn |
getEntryDn(String id)
Gets the Entry's Dn identified by the given id.
|
String |
getEntryId(org.apache.directory.api.ldap.model.name.Dn dn)
Gets the entry's id.
|
Index<?,String> |
getIndex(org.apache.directory.api.ldap.model.schema.AttributeType attributeType)
Get the user or system index associated with the given attributeType
|
Set<Index<?,String>> |
getIndexedAttributes() |
MasterTable |
getMasterTable()
Expose the Master table
|
Index<String,String> |
getObjectClassIndex() |
Index<String,String> |
getOneAliasIndex() |
Optimizer |
getOptimizer() |
String |
getParentId(String childId)
Gets the UUID of an entry's parent using the child entry's UUID.
|
URI |
getPartitionPath()
Gets the path in which this Partition stores data.
|
Index<String,String> |
getPresenceIndex() |
Index<ParentIdAndRdn,String> |
getRdnIndex() |
ReadWriteLock |
getReadWriteLock() |
SearchEngine |
getSearchEngine()
Gets the DefaultSearchEngine used by this ContextPartition to search the
Database.
|
Index<String,String> |
getSubAliasIndex() |
protected String |
getSuffixId()
Retrieve the SuffixID
|
Index<?,String> |
getSystemIndex(org.apache.directory.api.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<?,String> |
getUserIndex(org.apache.directory.api.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.api.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.api.ldap.model.schema.AttributeType attributeType)
Tells if an index is already present in the System's index list
|
boolean |
hasUserIndexOn(org.apache.directory.api.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() |
protected void |
loadContextCsn()
Loads the current context CSN present in the context entry of the partition
|
org.apache.directory.api.ldap.model.entry.Entry |
lookup(org.apache.directory.server.core.api.interceptor.context.LookupOperationContext lookupContext) |
org.apache.directory.api.ldap.model.entry.Entry |
lookupCache(String id)
looks up for the entry with the given ID in the cache
|
org.apache.directory.api.ldap.model.entry.Entry |
modify(org.apache.directory.api.ldap.model.name.Dn dn,
org.apache.directory.api.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.api.ldap.model.name.Dn oldDn,
org.apache.directory.api.ldap.model.name.Dn newSuperiorDn,
org.apache.directory.api.ldap.model.name.Dn newDn,
org.apache.directory.api.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.api.ldap.model.name.Dn oldDn,
org.apache.directory.api.ldap.model.name.Dn newSuperiorDn,
org.apache.directory.api.ldap.model.name.Rdn newRdn,
org.apache.directory.api.ldap.model.entry.Entry modifiedEntry,
boolean deleteOldRdn) |
void |
moveAndRename(org.apache.directory.server.core.api.interceptor.context.MoveAndRenameOperationContext moveAndRenameContext) |
void |
rename(org.apache.directory.api.ldap.model.name.Dn dn,
org.apache.directory.api.ldap.model.name.Rdn newRdn,
boolean deleteOldRdn,
org.apache.directory.api.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) |
void |
saveContextCsn() |
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<?,String>> indexedAttributes)
Set the list of indexes for this partition
|
void |
setOptimizer(Optimizer optimizer) |
void |
setOptimizerEnabled(boolean optimizerEnabled)
Set the optimizer flag
|
void |
setPartitionPath(URI partitionPath)
Sets the path in which this Partition stores data.
|
void |
setSearchEngine(SearchEngine searchEngine) |
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) |
void |
updateCache(org.apache.directory.server.core.api.interceptor.context.OperationContext opCtx)
updates the cache based on the type of OperationContext
|
protected void |
updateRdnIdx(String parentId,
boolean addRemove,
int nbDescendant) |
checkInitialized, destroy, getContextEntry, getId, getSchemaManager, getSuffixDn, initialize, isInitialized, setCacheService, setContextCsn, setContextEntry, setId, setSchemaManager, setSuffixDnprotected boolean optimizerEnabled
public static final int DEFAULT_CACHE_SIZE
protected int cacheSize
protected net.sf.ehcache.Cache aliasCache
protected net.sf.ehcache.Cache piarCache
protected AtomicBoolean isSyncOnWrite
protected URI partitionPath
protected MasterTable master
protected Map<String,Index<?,String>> userIndices
protected Map<String,Index<?,String>> systemIndices
protected Index<ParentIdAndRdn,String> rdnIdx
protected Index<String,String> objectClassIdx
protected Index<org.apache.directory.api.ldap.model.name.Dn,String> aliasIdx
protected Index<String,String> adminRoleIdx
protected org.apache.directory.api.ldap.model.schema.AttributeType OBJECT_CLASS_AT
protected org.apache.directory.api.ldap.model.schema.AttributeType ENTRY_CSN_AT
protected org.apache.directory.api.ldap.model.schema.AttributeType ENTRY_DN_AT
protected org.apache.directory.api.ldap.model.schema.AttributeType ENTRY_UUID_AT
protected org.apache.directory.api.ldap.model.schema.AttributeType ALIASED_OBJECT_NAME_AT
protected org.apache.directory.api.ldap.model.schema.AttributeType ADMINISTRATIVE_ROLE_AT
protected org.apache.directory.api.ldap.model.schema.AttributeType CONTEXT_CSN_AT
protected static final boolean ADD_CHILD
protected static final boolean REMOVE_CHILD
protected AbstractBTreePartition(org.apache.directory.api.ldap.model.schema.SchemaManager schemaManager)
schemaManager - the schema managerprotected AbstractBTreePartition(org.apache.directory.api.ldap.model.schema.SchemaManager schemaManager,
org.apache.directory.server.core.api.DnFactory dnFactory)
schemaManager - the schema managerdnFactory - the DN factorypublic int getCacheSize()
getCacheSize in interface Storepublic void setCacheSize(int cacheSize)
setCacheSize in interface StorecacheSize - 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 StorepartitionDir - the path in which this Partition stores data.public boolean isSyncOnWrite()
isSyncOnWrite in interface Storetrue if we write to disk for every modificationpublic void setSyncOnWrite(boolean isSyncOnWrite)
setSyncOnWrite in interface StoreisSyncOnWrite - A boolean set to true if we have to flush on disk
when a modification occursprotected void setupSystemIndices()
throws Exception
Exceptionprotected void setupUserIndices()
throws Exception
Exceptionpublic SearchEngine getSearchEngine()
protected abstract Index<?,String> convertAndInit(Index<?,String> index) throws Exception
index - the indexExceptionpublic URI getPartitionPath()
getPartitionPath in interface Storeprotected void doDestroy()
throws org.apache.directory.api.ldap.model.exception.LdapException,
Exception
doDestroy in class org.apache.directory.server.core.api.partition.AbstractPartitionorg.apache.directory.api.ldap.model.exception.LdapExceptionExceptionprotected void doInit()
throws Exception
doInit in class org.apache.directory.server.core.api.partition.AbstractPartitionExceptionpublic void add(org.apache.directory.server.core.api.interceptor.context.AddOperationContext addContext)
throws org.apache.directory.api.ldap.model.exception.LdapException
add in interface org.apache.directory.server.core.api.partition.Partitionorg.apache.directory.api.ldap.model.exception.LdapExceptionpublic org.apache.directory.api.ldap.model.entry.Entry delete(org.apache.directory.server.core.api.interceptor.context.DeleteOperationContext deleteContext)
throws org.apache.directory.api.ldap.model.exception.LdapException
delete in interface org.apache.directory.server.core.api.partition.Partitionorg.apache.directory.api.ldap.model.exception.LdapExceptionprotected void updateRdnIdx(String parentId, boolean addRemove, int nbDescendant) throws Exception
Exceptionpublic org.apache.directory.api.ldap.model.entry.Entry delete(String id) throws org.apache.directory.api.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.api.ldap.model.exception.LdapException
search in interface org.apache.directory.server.core.api.partition.Partitionorg.apache.directory.api.ldap.model.exception.LdapExceptionpublic org.apache.directory.api.ldap.model.entry.Entry lookup(org.apache.directory.server.core.api.interceptor.context.LookupOperationContext lookupContext)
throws org.apache.directory.api.ldap.model.exception.LdapException
lookup in interface org.apache.directory.server.core.api.partition.Partitionorg.apache.directory.api.ldap.model.exception.LdapExceptionpublic org.apache.directory.api.ldap.model.entry.Entry fetch(String id) throws org.apache.directory.api.ldap.model.exception.LdapException
public org.apache.directory.api.ldap.model.entry.Entry fetch(String id, org.apache.directory.api.ldap.model.name.Dn dn) throws org.apache.directory.api.ldap.model.exception.LdapException
fetch in interface Storeid - The Entry UUID we want to get backdn - The entry DN when we have itException - If the lookup failed for any reason (except a not found entry)org.apache.directory.api.ldap.model.exception.LdapExceptionpublic void modify(org.apache.directory.server.core.api.interceptor.context.ModifyOperationContext modifyContext)
throws org.apache.directory.api.ldap.model.exception.LdapException
modify in interface org.apache.directory.server.core.api.partition.Partitionorg.apache.directory.api.ldap.model.exception.LdapExceptionpublic final org.apache.directory.api.ldap.model.entry.Entry modify(org.apache.directory.api.ldap.model.name.Dn dn,
org.apache.directory.api.ldap.model.entry.Modification... mods)
throws Exception
public void move(org.apache.directory.server.core.api.interceptor.context.MoveOperationContext moveContext)
throws org.apache.directory.api.ldap.model.exception.LdapException
move in interface org.apache.directory.server.core.api.partition.Partitionorg.apache.directory.api.ldap.model.exception.LdapExceptionpublic final void move(org.apache.directory.api.ldap.model.name.Dn oldDn,
org.apache.directory.api.ldap.model.name.Dn newSuperiorDn,
org.apache.directory.api.ldap.model.name.Dn newDn,
org.apache.directory.api.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 UUID won't change.
We have a few check we must do before moving the entry :
public void moveAndRename(org.apache.directory.server.core.api.interceptor.context.MoveAndRenameOperationContext moveAndRenameContext)
throws org.apache.directory.api.ldap.model.exception.LdapException
moveAndRename in interface org.apache.directory.server.core.api.partition.Partitionorg.apache.directory.api.ldap.model.exception.LdapExceptionpublic final void moveAndRename(org.apache.directory.api.ldap.model.name.Dn oldDn,
org.apache.directory.api.ldap.model.name.Dn newSuperiorDn,
org.apache.directory.api.ldap.model.name.Rdn newRdn,
org.apache.directory.api.ldap.model.entry.Entry modifiedEntry,
boolean deleteOldRdn)
throws Exception
moveAndRename in interface StoreExceptionpublic void rename(org.apache.directory.server.core.api.interceptor.context.RenameOperationContext renameContext)
throws org.apache.directory.api.ldap.model.exception.LdapException
rename in interface org.apache.directory.server.core.api.partition.Partitionorg.apache.directory.api.ldap.model.exception.LdapExceptionpublic final void rename(org.apache.directory.api.ldap.model.name.Dn dn,
org.apache.directory.api.ldap.model.name.Rdn newRdn,
boolean deleteOldRdn,
org.apache.directory.api.ldap.model.entry.Entry entry)
throws Exception
public final void unbind(org.apache.directory.server.core.api.interceptor.context.UnbindOperationContext unbindContext)
throws org.apache.directory.api.ldap.model.exception.LdapException
unbind in interface org.apache.directory.server.core.api.partition.Partitionorg.apache.directory.api.ldap.model.exception.LdapExceptionpublic boolean hasEntry(org.apache.directory.server.core.api.interceptor.context.HasEntryOperationContext entryContext)
throws org.apache.directory.api.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.api.ldap.model.exception.LdapExceptionprotected org.apache.directory.api.ldap.model.name.Dn buildEntryDn(String id) throws Exception
id - the entry's idExceptionpublic long count()
throws Exception
public final long getChildCount(String id) throws org.apache.directory.api.ldap.model.exception.LdapException
getChildCount in interface Storeid - the entry UUIDorg.apache.directory.api.ldap.model.exception.LdapExceptionpublic final org.apache.directory.api.ldap.model.name.Dn getEntryDn(String id) throws Exception
getEntryDn in interface Storeid - the entry's idExceptionpublic final String getEntryId(org.apache.directory.api.ldap.model.name.Dn dn) throws org.apache.directory.api.ldap.model.exception.LdapException
null if the Dn doesn't exist in this store.
Note that the Dn must be normalized!getEntryId in interface Storedn - the normalized entry Dnnull if the Dn doesn't existsorg.apache.directory.api.ldap.model.exception.LdapExceptionpublic String getParentId(String childId) throws Exception
getParentId in interface StorechildId - the UUID of the entryException - on failures to access the underlying storepublic void addIndex(Index<?,String> index) throws Exception
public void addIndexedAttributes(Index<?,String>... indexes)
indexes - The added indexespublic void setIndexedAttributes(Set<Index<?,String>> indexedAttributes)
indexedAttributes - The list of indexespublic Set<Index<?,String>> getIndexedAttributes()
public Iterator<String> getUserIndices()
getUserIndices in interface Storepublic Iterator<String> getSystemIndices()
getSystemIndices in interface Storepublic Index<?,String> getIndex(org.apache.directory.api.ldap.model.schema.AttributeType attributeType) throws IndexNotFoundException
getIndex in interface StoreattributeType - The index attributeType we are looking forIndexNotFoundException - If the index does not existpublic Index<?,String> getUserIndex(org.apache.directory.api.ldap.model.schema.AttributeType attributeType) throws IndexNotFoundException
getUserIndex in interface StoreattributeType - The index name we are looking forIndexNotFoundException - If the index does not existpublic Index<?,String> getSystemIndex(org.apache.directory.api.ldap.model.schema.AttributeType attributeType) throws IndexNotFoundException
getSystemIndex in interface StoreattributeType - The index name we are looking forIndexNotFoundException - If the index does not existpublic Index<org.apache.directory.api.ldap.model.name.Dn,String> getAliasIndex()
getAliasIndex in interface Storepublic Index<String,String> getOneAliasIndex()
getOneAliasIndex in interface Storepublic Index<String,String> getSubAliasIndex()
getSubAliasIndex in interface Storepublic Index<String,String> getObjectClassIndex()
getObjectClassIndex in interface Storepublic Index<String,String> getEntryCsnIndex()
getEntryCsnIndex in interface Storepublic Index<String,String> getPresenceIndex()
getPresenceIndex in interface Storepublic Index<ParentIdAndRdn,String> getRdnIndex()
getRdnIndex in interface Storepublic boolean hasUserIndexOn(org.apache.directory.api.ldap.model.schema.AttributeType attributeType)
throws org.apache.directory.api.ldap.model.exception.LdapException
hasUserIndexOn in interface StoreattributeType - The attributeType index we are looking fortrue if the index is already present in the
User's index listorg.apache.directory.api.ldap.model.exception.LdapExceptionpublic boolean hasSystemIndexOn(org.apache.directory.api.ldap.model.schema.AttributeType attributeType)
throws org.apache.directory.api.ldap.model.exception.LdapException
hasSystemIndexOn in interface StoreattributeType - The index we are looking fortrue if the index is already present in the
System's index listorg.apache.directory.api.ldap.model.exception.LdapExceptionpublic boolean hasIndexOn(org.apache.directory.api.ldap.model.schema.AttributeType attributeType)
throws org.apache.directory.api.ldap.model.exception.LdapException
hasIndexOn in interface Storetrue if the index is already present in the
User's or System's index listorg.apache.directory.api.ldap.model.exception.LdapExceptionprotected void addAliasIndices(String aliasId, org.apache.directory.api.ldap.model.name.Dn aliasDn, org.apache.directory.api.ldap.model.name.Dn 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 addorg.apache.directory.api.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 alteredprotected void dropAliasIndices(String aliasId) throws Exception
aliasId - the id of the alias entry in the master tableorg.apache.directory.api.ldap.model.exception.LdapException - if we cannot parse ldap namesException - if we cannot delete index values in the databaseprotected void dropMovedAliasIndices(org.apache.directory.api.ldap.model.name.Dn movedBase)
throws Exception
movedBase - the base at which the move occurred - the moved nodeException - if system userIndices failpublic 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.AbstractPartitionIOExceptionprotected abstract Index createSystemIndex(String indexOid, URI path, boolean withReverse) throws Exception
indexOid - The Attribute OIDpath - The working directory where this indew will be storedException - If the index can't be createdpublic MasterTable getMasterTable()
getMasterTable in interface Storepublic void updateCache(org.apache.directory.server.core.api.interceptor.context.OperationContext opCtx)
opCtx - the operation's contextpublic org.apache.directory.api.ldap.model.entry.Entry lookupCache(String id)
id - the ID of the entrypublic void addToCache(String id, org.apache.directory.api.ldap.model.entry.Entry entry)
id - ID of the entryentry - the Entrypublic Optimizer getOptimizer()
public void setOptimizer(Optimizer optimizer)
optimizer - the optimizer to setpublic void setSearchEngine(SearchEngine searchEngine)
searchEngine - the searchEngine to setpublic ReadWriteLock getReadWriteLock()
getReadWriteLock in interface Storepublic net.sf.ehcache.Cache getAliasCache()
getAliasCache in interface Storepublic String getContextCsn()
getContextCsn in interface org.apache.directory.server.core.api.partition.PartitiongetContextCsn in class org.apache.directory.server.core.api.partition.AbstractPartitionprotected void loadContextCsn()
org.apache.directory.api.ldap.model.exception.LdapExceptionpublic void saveContextCsn()
throws org.apache.directory.api.ldap.model.exception.LdapException
saveContextCsn in interface org.apache.directory.server.core.api.partition.Partitionorg.apache.directory.api.ldap.model.exception.LdapExceptionCopyright © 2003–2015 The Apache Software Foundation. All rights reserved.