public class JdbmPartition 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 java.lang.String |
JDBM_DB_FILE_EXTN |
private static org.slf4j.Logger |
LOG
static logger
|
private jdbm.RecordManager |
recMan
the JDBM record manager used by this database
|
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 |
|---|
JdbmPartition(org.apache.directory.api.ldap.model.schema.SchemaManager schemaManager,
DnFactory dnFactory)
Creates a store based on JDBM B+Trees.
|
| 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>> indices)
Builds user defined indexes on a attributes by browsing all the entries present in master db
Note: if the given list of indices contains any system index that will be skipped.
|
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 oid,
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)
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.lang.String |
getDefaultId()
}
|
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()
This method is called when the synch thread is waking up, to write
the modified data.
|
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 JDBM_DB_FILE_EXTN
private static final java.io.FilenameFilter DB_FILTER
private jdbm.RecordManager recMan
private net.sf.ehcache.Cache entryCache
public JdbmPartition(org.apache.directory.api.ldap.model.schema.SchemaManager schemaManager,
DnFactory dnFactory)
protected void doInit()
throws java.lang.Exception
AbstractBTreePartitiondoInit in class AbstractBTreePartitionjava.lang.Exceptionpublic java.lang.String getDefaultId()
public java.lang.String getRootId()
public void sync()
throws java.lang.Exception
java.lang.Exception - on failures to sync database files to diskprivate void buildUserIndex(java.util.List<Index<?,java.lang.String>> indices) throws java.lang.Exception
indices - then selected indexes that need to be builtjava.lang.Exception - in case of any problems while building the indexprivate void deleteUnusedIndexFiles(java.util.List<java.lang.String> allIndices,
java.io.File[] dbFiles)
protected Index<?,java.lang.String> convertAndInit(Index<?,java.lang.String> index) throws java.lang.Exception
convertAndInit in class AbstractBTreePartitionindex - the indexjava.lang.Exceptionprotected void doDestroy()
throws java.lang.Exception
doDestroy in class AbstractBTreePartitionjava.lang.Exceptionprotected final Index createSystemIndex(java.lang.String oid, java.net.URI path, boolean withReverse) throws java.lang.Exception
createSystemIndex in class AbstractBTreePartitionoid - The Attribute OIDpath - The working directory where this indew will be storedjava.lang.Exception - If the index can't be createdpublic void updateCache(OperationContext opCtx)
AbstractBTreePartitionupdateCache in class AbstractBTreePartitionopCtx - the operation's contextpublic 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 Entry