org.apache.directory.server.core.factory
Interface PartitionFactory

All Known Implementing Classes:
AvlPartitionFactory, JdbmPartitionFactory, LdifPartitionFactory

public interface PartitionFactory

A factory used to generate Partitions and their Indexes.

Version:
$Rev$, $Date$
Author:
Apache Directory Project

Method Summary
 void addIndex(Partition partition, java.lang.String attributeId, int cacheSize)
          Adds a partition-specific index to the partition.
 Partition createPartition(java.lang.String id, java.lang.String suffix, int cacheSize, java.io.File workingDirectory)
          Creates a new Partition.
 

Method Detail

createPartition

Partition createPartition(java.lang.String id,
                          java.lang.String suffix,
                          int cacheSize,
                          java.io.File workingDirectory)
                          throws java.lang.Exception
Creates a new Partition.

Parameters:
id - the partition id
suffix - the suffix
cacheSize - the cache size
workingDirectory - the working directory
Returns:
the partition
Throws:
java.lang.Exception - the exception

addIndex

void addIndex(Partition partition,
              java.lang.String attributeId,
              int cacheSize)
              throws java.lang.Exception
Adds a partition-specific index to the partition.

Parameters:
partition - the partition
attrbuteId - the attribute id
cacheSize - the cache size
Throws:
java.lang.Exception - the exception


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