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

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.LdifPartition
All Implemented Interfaces:
Partition, Store<org.apache.directory.shared.ldap.model.entry.Entry,Long>

public class LdifPartition
extends AbstractLdifPartition

A LDIF based partition. Data are stored on disk as LDIF, following this organization :

  • each entry is associated with a file, post-fixed with LDIF
  • each entry having at least one child will have a directory created using its name. The root is the partition's suffix.
    So for instance, we may have on disk :
     /ou=example,ou=system.ldif
     /ou=example,ou=system/
       |
       +--> cn=test.ldif
            cn=test/
               |
               +--> cn=another test.ldif
                    ...
     


    In this exemple, the partition's suffix is ou=example,ou=system.

    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
    LdifPartition(org.apache.directory.shared.ldap.model.schema.SchemaManager schemaManager)
              Creates a new instance of LdifPartition.
     
    Method Summary
     void add(AddOperationContext addContext)
              
     void delete(Long id)
              
    protected  void doInit()
              
     void modify(ModifyOperationContext modifyContext)
              
     void move(MoveOperationContext moveContext)
              
     void moveAndRename(MoveAndRenameOperationContext moveAndRenameContext)
              
     void rename(RenameOperationContext renameContext)
              
     
    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, 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, 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

    LdifPartition

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

    Method Detail

    doInit

    protected void doInit()
                   throws Exception

    Overrides:
    doInit in class AvlPartition
    Throws:
    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

    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

    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

    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 moveAndRenameContext)
                       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

    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


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