org.apache.directory.server.core.partition.impl.avl
Class AvlPartition

java.lang.Object
  extended by org.apache.directory.server.core.api.partition.AbstractPartition
      extended by org.apache.directory.server.core.partition.impl.btree.AbstractBTreePartition<Long>
          extended by org.apache.directory.server.core.partition.impl.avl.AvlPartition
All Implemented Interfaces:
org.apache.directory.server.core.api.partition.Partition, Store<org.apache.directory.shared.ldap.model.entry.Entry,Long>

public class AvlPartition
extends AbstractBTreePartition<Long>

An XDBM Partition backed by in memory AVL Trees.

Author:
Apache Directory Project

Field Summary
 
Fields inherited from class org.apache.directory.server.core.partition.impl.btree.AbstractBTreePartition
ALIASED_OBJECT_NAME_AT, aliasIdx, cacheSize, DEFAULT_CACHE_SIZE, ENTRY_CSN_AT, ENTRY_UUID_AT, entryCsnIdx, entryUuidIdx, isSyncOnWrite, master, OBJECT_CLASS_AT, objectClassIdx, oneAliasIdx, oneLevelIdx, optimizer, optimizerEnabled, partitionPath, presenceIdx, rdnIdx, searchEngine, subAliasIdx, subLevelIdx, systemIndices, 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
AvlPartition(org.apache.directory.shared.ldap.model.schema.SchemaManager schemaManager)
          Creates a store based on AVL Trees.
 
Method Summary
protected  Index<?,org.apache.directory.shared.ldap.model.entry.Entry,Long> convertAndInit(Index<?,org.apache.directory.shared.ldap.model.entry.Entry,Long> index)
          Convert and initialize an index for a specific store implementation.
protected  void doInit()
          
 int getCacheSize()
          Always returns 0 (zero), cause this is a in-memory store
 Long getDefaultId()
          Gets the default ID.
 URI getPartitionPath()
          Gets the path in which this Partition stores data.
 Long getRootId()
          Gets the root ID of this store implementation.
 boolean isSyncOnWrite()
          always returns false, cause this is a in-memory store
 void sync()
          
 
Methods inherited from class org.apache.directory.server.core.partition.impl.btree.AbstractBTreePartition
add, addAliasIndices, addIndex, addIndexedAttributes, buildEntryDn, count, delete, delete, doDestroy, dropAliasIndices, dropAliasIndices, dropMovedAliasIndices, dumpIndex, getAliasIndex, getChildCount, getEntryCsnIndex, getEntryDn, getEntryId, getEntryUuidIndex, getIndex, getIndexedAttributes, getObjectClassIndex, getOneAliasIndex, getOneLevelIndex, getParentId, getPresenceIndex, getRdnIndex, getSearchEngine, getSubAliasIndex, getSubLevelIndex, getSuffixId, getSystemIndex, getSystemIndices, getUserIndex, getUserIndices, hasEntry, hasIndexOn, hasSystemIndexOn, hasUserIndexOn, isOptimizerEnabled, list, list, lookup, lookup, modify, modify, move, move, moveAndRename, moveAndRename, rename, rename, search, setCacheSize, setIndexedAttributes, setOptimizerEnabled, setPartitionPath, setSyncOnWrite, setupSystemIndices, setupUserIndices, toString, unbind
 
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
 

Constructor Detail

AvlPartition

public AvlPartition(org.apache.directory.shared.ldap.model.schema.SchemaManager schemaManager)
Creates a store based on AVL Trees.

Method Detail

doInit

protected void doInit()
               throws Exception

Overrides:
doInit in class AbstractBTreePartition<Long>
Throws:
Exception

getDefaultId

public Long getDefaultId()
Gets the default ID.}

Specified by:
getDefaultId in interface Store<org.apache.directory.shared.ldap.model.entry.Entry,Long>
Specified by:
getDefaultId in class AbstractBTreePartition<Long>
Returns:
the default ID.

getRootId

public Long getRootId()
Gets the root ID of this store implementation.

Specified by:
getRootId in interface Store<org.apache.directory.shared.ldap.model.entry.Entry,Long>
Specified by:
getRootId in class AbstractBTreePartition<Long>
Returns:
the root ID

sync

public void sync()
          throws Exception

Throws:
Exception

isSyncOnWrite

public boolean isSyncOnWrite()
always returns false, cause this is a in-memory store

Specified by:
isSyncOnWrite in interface Store<org.apache.directory.shared.ldap.model.entry.Entry,Long>
Overrides:
isSyncOnWrite in class AbstractBTreePartition<Long>
Returns:
true if we write to disk for every modification

getCacheSize

public int getCacheSize()
Always returns 0 (zero), cause this is a in-memory store

Specified by:
getCacheSize in interface Store<org.apache.directory.shared.ldap.model.entry.Entry,Long>
Overrides:
getCacheSize in class AbstractBTreePartition<Long>
Returns:
the maximum size of the cache as the number of entries maximum before paging out

convertAndInit

protected Index<?,org.apache.directory.shared.ldap.model.entry.Entry,Long> convertAndInit(Index<?,org.apache.directory.shared.ldap.model.entry.Entry,Long> index)
                                                                                   throws Exception
Description copied from class: AbstractBTreePartition
Convert and initialize an index for a specific store implementation.

Specified by:
convertAndInit in class AbstractBTreePartition<Long>
Parameters:
index - the index
Returns:
the converted and initialized index
Throws:
Exception

getPartitionPath

public URI getPartitionPath()
Gets the path in which this Partition stores data.

Specified by:
getPartitionPath in interface Store<org.apache.directory.shared.ldap.model.entry.Entry,Long>
Overrides:
getPartitionPath in class AbstractBTreePartition<Long>
Returns:
the path in which this Partition stores data.


Copyright © 2003-2012 The Apache Software Foundation. All Rights Reserved.