public class MavibotPartition extends AbstractBTreePartition
| Modifier and Type | Field and Description |
|---|---|
private static java.io.FilenameFilter |
DB_FILTER |
private net.sf.ehcache.Cache |
entryCache
the entry cache
|
private static org.slf4j.Logger |
LOG
static logger
|
private static java.lang.String |
MAVIBOT_DB_FILE_EXTN |
private org.apache.directory.mavibot.btree.RecordManager |
recordMan |
ADD_CHILD, administrativeRoleAT, adminRoleIdx, aliasCache, aliasedObjectNameAT, aliasIdx, cacheSize, contextCsnAT, DEFAULT_CACHE_SIZE, entryCsnAT, entryCsnIdx, entryDnAT, entryUuidAT, isSyncOnWrite, master, objectClassAT, objectClassIdx, oneAliasIdx, optimizerEnabled, partitionPath, piarCache, presenceIdx, rdnIdx, REMOVE_CHILD, subAliasIdx, systemIndices, userIndicescacheService, contextEntry, ctxCsnChanged, dnFactory, id, initialized, schemaManager, suffixDnSYS_INDEX_OID_ARRAY, SYS_INDEX_OIDSDEFAULT_ID, ROOT_ID| Constructor and Description |
|---|
MavibotPartition(org.apache.directory.api.ldap.model.schema.SchemaManager schemaManager,
DnFactory dnFactory) |
| Modifier and Type | Method and Description |
|---|---|
void |
addToCache(java.lang.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
|
private void |
buildUserIndex(java.util.List<Index<?,java.lang.String>> userIndexes)
Builds user defined indexes on a attributes by browsing all the entries present in master db
|
protected Index<?,java.lang.String> |
convertAndInit(Index<?,java.lang.String> index)
Convert and initialize an index for a specific store implementation.
|
protected Index |
createSystemIndex(java.lang.String indexOid,
java.net.URI path,
boolean withReverse)
Create a new Index for a given OID
|
private void |
deleteUnusedIndexFiles(java.util.List<java.lang.String> allIndices,
java.io.File[] dbFiles)
jdbm
removes any unused/removed attribute index files present under the partition's
working directory
|
protected void |
doDestroy()
Override this method to put your initialization code.
|
protected void |
doInit()
Override this method to put your initialization code.
|
java.util.Set<Index<?,java.lang.String>> |
getAllIndices() |
java.lang.String |
getDefaultId()
}
|
org.apache.directory.mavibot.btree.RecordManager |
getRecordMan() |
java.lang.String |
getRootId() |
org.apache.directory.api.ldap.model.entry.Entry |
lookupCache(java.lang.String id)
looks up for the entry with the given ID in the cache
|
void |
sync()
Flushes any changes made to this partition now.
|
void |
updateCache(OperationContext opCtx)
updates the cache based on the type of OperationContext
|
add, addAliasIndices, addIndex, addIndexedAttributes, buildEntryDn, count, delete, delete, dropAliasIndices, dropMovedAliasIndices, dumpIndex, dumpRdnIdx, fetch, fetch, getAdministrativeRoleIndex, getAliasCache, getAliasIndex, getCacheSize, getChildCount, getContextCsn, getEntryCsnIndex, getEntryDn, getEntryId, getIndex, getIndexedAttributes, getMasterTable, getObjectClassIndex, getOneAliasIndex, getOptimizer, getParentId, getPartitionPath, getPresenceIndex, getRdnIndex, getReadWriteLock, getSearchEngine, getSubAliasIndex, getSuffixId, getSystemIndex, getSystemIndices, getUserIndex, getUserIndices, hasEntry, hasIndexOn, hasSystemIndexOn, hasUserIndexOn, isOptimizerEnabled, isSyncOnWrite, loadContextCsn, lookup, modify, modify, move, move, moveAndRename, moveAndRename, rename, rename, saveContextCsn, search, setCacheSize, setIndexedAttributes, setOptimizer, setOptimizerEnabled, setPartitionPath, setSearchEngine, setSyncOnWrite, setupSystemIndices, setupUserIndices, toString, unbind, updateRdnIdxcheckInitialized, destroy, getContextEntry, getId, getSchemaManager, getSuffixDn, initialize, isInitialized, setCacheService, setContextCsn, setContextEntry, setId, setSchemaManager, setSuffixDnprivate static final org.slf4j.Logger LOG
private static final java.lang.String MAVIBOT_DB_FILE_EXTN
private static final java.io.FilenameFilter DB_FILTER
private org.apache.directory.mavibot.btree.RecordManager recordMan
private net.sf.ehcache.Cache entryCache
public MavibotPartition(org.apache.directory.api.ldap.model.schema.SchemaManager schemaManager,
DnFactory dnFactory)
protected void doInit()
throws java.lang.Exception
AbstractBTreePartitiondoInit in class AbstractBTreePartitionjava.lang.Exceptionprotected Index<?,java.lang.String> convertAndInit(Index<?,java.lang.String> index) throws java.lang.Exception
AbstractBTreePartitionconvertAndInit in class AbstractBTreePartitionindex - the indexjava.lang.Exceptionprotected void doDestroy()
throws java.lang.Exception
doDestroy in class AbstractBTreePartitionjava.lang.Exceptionprotected Index createSystemIndex(java.lang.String indexOid, java.net.URI path, boolean withReverse) throws java.lang.Exception
AbstractBTreePartitioncreateSystemIndex in class AbstractBTreePartitionindexOid - The Attribute OIDpath - The working directory where this indew will be storedjava.lang.Exception - If the index can't be createdpublic void sync()
throws java.lang.Exception
Partitionjava.lang.Exception - if buffers cannot be flushed to diskprivate void deleteUnusedIndexFiles(java.util.List<java.lang.String> allIndices,
java.io.File[] dbFiles)
private void buildUserIndex(java.util.List<Index<?,java.lang.String>> userIndexes) throws java.lang.Exception
userIndexes - then user defined indexes to createjava.lang.Exception - in case of any problems while building the indexpublic java.lang.String getDefaultId()
public java.lang.String getRootId()
public org.apache.directory.mavibot.btree.RecordManager getRecordMan()
public org.apache.directory.api.ldap.model.entry.Entry lookupCache(java.lang.String id)
AbstractBTreePartitionlookupCache in class AbstractBTreePartitionid - the ID of the entrypublic void addToCache(java.lang.String id,
org.apache.directory.api.ldap.model.entry.Entry entry)
AbstractBTreePartitionaddToCache in class AbstractBTreePartitionid - ID of the entryentry - the Entrypublic void updateCache(OperationContext opCtx)
AbstractBTreePartitionupdateCache in class AbstractBTreePartitionopCtx - the operation's contextpublic java.util.Set<Index<?,java.lang.String>> getAllIndices()