org.apache.directory.server.core.partition.ldif
Class SingleFileLdifPartition

java.lang.Object
  extended by org.apache.directory.server.core.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
              extended by org.apache.directory.server.core.partition.ldif.AbstractLdifPartition
                  extended by org.apache.directory.server.core.partition.ldif.SingleFileLdifPartition
All Implemented Interfaces:
Partition, Store<org.apache.directory.shared.ldap.model.entry.Entry,Long>

public class SingleFileLdifPartition
extends AbstractLdifPartition

A Partition implementation backed by a single LDIF file.

Author:
Apache Directory Project

Field Summary
 
Fields inherited from class org.apache.directory.server.core.partition.ldif.AbstractLdifPartition
CONF_FILE_EXTN, defaultCSNFactory
 
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.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
SingleFileLdifPartition(org.apache.directory.shared.ldap.model.schema.SchemaManager schemaManager)
          Creates a new instance of SingleFileLdifPartition.
 
Method Summary
 void add(AddOperationContext addContext)
          
 void delete(Long id)
           
protected  void doDestroy()
          
protected  void doInit()
           
 void modify(ModifyOperationContext modifyContext)
          
 void move(MoveOperationContext moveContext)
          
 void moveAndRename(MoveAndRenameOperationContext opContext)
          
 void rename(RenameOperationContext renameContext)
          
 void setEnableRewriting(boolean enableRewriting)
          enable/disable the re-writing of partition data.
 
Methods inherited from class org.apache.directory.server.core.partition.ldif.AbstractLdifPartition
getDefaultId, getPartitionPath
 
Methods inherited from class org.apache.directory.server.core.partition.impl.avl.AvlPartition
convertAndInit, getCacheSize, getRootId, isSyncOnWrite, sync
 
Methods inherited from class org.apache.directory.server.core.partition.impl.btree.AbstractBTreePartition
addAliasIndices, addIndex, addIndexedAttributes, bind, buildEntryDn, count, delete, 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, move, moveAndRename, rename, search, setCacheSize, setIndexedAttributes, setOptimizerEnabled, setPartitionPath, setSyncOnWrite, setupSystemIndices, setupUserIndices, toString, unbind
 
Methods inherited from class org.apache.directory.server.core.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

SingleFileLdifPartition

public SingleFileLdifPartition(org.apache.directory.shared.ldap.model.schema.SchemaManager schemaManager)
Creates a new instance of SingleFileLdifPartition.

Method Detail

doInit

protected void doInit()
               throws InvalidNameException,
                      Exception
Overrides:
doInit in class AvlPartition
Throws:
InvalidNameException
Exception

add

public void add(AddOperationContext addContext)
         throws org.apache.directory.shared.ldap.model.exception.LdapException

Specified by:
add in interface Partition
Overrides:
add in class AbstractBTreePartition<Long>
Throws:
org.apache.directory.shared.ldap.model.exception.LdapException

modify

public void modify(ModifyOperationContext modifyContext)
            throws org.apache.directory.shared.ldap.model.exception.LdapException

Specified by:
modify in interface Partition
Overrides:
modify in class AbstractBTreePartition<Long>
Throws:
org.apache.directory.shared.ldap.model.exception.LdapException

rename

public void rename(RenameOperationContext renameContext)
            throws org.apache.directory.shared.ldap.model.exception.LdapException

Specified by:
rename in interface Partition
Overrides:
rename in class AbstractBTreePartition<Long>
Throws:
org.apache.directory.shared.ldap.model.exception.LdapException

move

public void move(MoveOperationContext moveContext)
          throws org.apache.directory.shared.ldap.model.exception.LdapException

Specified by:
move in interface Partition
Overrides:
move in class AbstractBTreePartition<Long>
Throws:
org.apache.directory.shared.ldap.model.exception.LdapException

moveAndRename

public void moveAndRename(MoveAndRenameOperationContext opContext)
                   throws org.apache.directory.shared.ldap.model.exception.LdapException

Specified by:
moveAndRename in interface Partition
Overrides:
moveAndRename in class AbstractBTreePartition<Long>
Throws:
org.apache.directory.shared.ldap.model.exception.LdapException

delete

public void delete(Long id)
            throws org.apache.directory.shared.ldap.model.exception.LdapException
Specified by:
delete in interface Store<org.apache.directory.shared.ldap.model.entry.Entry,Long>
Overrides:
delete in class AbstractBTreePartition<Long>
Throws:
org.apache.directory.shared.ldap.model.exception.LdapException

doDestroy

protected void doDestroy()
                  throws Exception

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

setEnableRewriting

public void setEnableRewriting(boolean enableRewriting)
                        throws org.apache.directory.shared.ldap.model.exception.LdapException
enable/disable the re-writing of partition data. This method internally calls the @see rewritePartitionData() to save any dirty data if present

Parameters:
enableRewriting - flag to enable/disable re-writing
Throws:
org.apache.directory.shared.ldap.model.exception.LdapException


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