org.apache.directory.server.core.configuration
Class PartitionConfiguration

java.lang.Object
  extended by org.apache.directory.server.core.configuration.PartitionConfiguration
Direct Known Subclasses:
BTreePartitionConfiguration

public class PartitionConfiguration
extends java.lang.Object

A configuration for Partition.

Version:
$Rev: 498848 $, $Date: 2007-01-23 00:25:45 +0100 (Tue, 23 Jan 2007) $
Author:
Apache Directory Project

Field Summary
static int DEFAULT_CACHE_SIZE
           
static java.lang.String SYSTEM_PARTITION_NAME
          The name of reserved system partition
 
Constructor Summary
protected PartitionConfiguration()
          Creates a new instance.
 
Method Summary
 int getCacheSize()
          Get's the entry cache size for this partition.
 javax.naming.directory.Attributes getContextEntry()
          Returns root entry that will be added to the Partition after it is initialized.
 Partition getContextPartition()
          Returns the Partition that this configuration configures.
 java.util.Set getIndexedAttributes()
          Returns the set of attribute type strings to create an index on.
 java.lang.String getName()
          Returns user-defined name of the Partition that this configuration configures.
 javax.naming.Name getNormalizedSuffix(MatchingRuleRegistry matchingRuleRegistry)
          Returns the normalized suffix of the Partition.
 javax.naming.Name getNormalizedSuffix(org.apache.directory.shared.ldap.schema.Normalizer normalizer)
          Returns the normalized suffix of the Partition.
 java.lang.String getSuffix()
          Returns the suffix of the Partition.
protected  void setCacheSize(int cacheSize)
          Used to specify the entry cache size for a partition.
protected  void setContextEntry(javax.naming.directory.Attributes rootEntry)
          Sets root entry that will be added to the Partition after it is initialized.
protected  void setContextPartition(Partition partition)
          Sets the Partition that this configuration configures.
protected  void setIndexedAttributes(java.util.Set indexedAttributes)
          Sets the set of attribute type strings to create an index on.
protected  void setName(java.lang.String name)
          Sets user-defined name of the Partition that this configuration configures.
protected  void setSuffix(java.lang.String suffix)
          Sets the suffix of the Partition.
 void validate()
          Validates this configuration.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SYSTEM_PARTITION_NAME

public static final java.lang.String SYSTEM_PARTITION_NAME
The name of reserved system partition

See Also:
Constant Field Values

DEFAULT_CACHE_SIZE

public static final int DEFAULT_CACHE_SIZE
See Also:
Constant Field Values
Constructor Detail

PartitionConfiguration

protected PartitionConfiguration()
Creates a new instance.

Method Detail

getName

public java.lang.String getName()
Returns user-defined name of the Partition that this configuration configures.


setName

protected void setName(java.lang.String name)
Sets user-defined name of the Partition that this configuration configures.


getIndexedAttributes

public java.util.Set getIndexedAttributes()
Returns the set of attribute type strings to create an index on.


setIndexedAttributes

protected void setIndexedAttributes(java.util.Set indexedAttributes)
Sets the set of attribute type strings to create an index on.


getContextPartition

public Partition getContextPartition()
Returns the Partition that this configuration configures.


setContextPartition

protected void setContextPartition(Partition partition)
Sets the Partition that this configuration configures.


getContextEntry

public javax.naming.directory.Attributes getContextEntry()
Returns root entry that will be added to the Partition after it is initialized.


setContextEntry

protected void setContextEntry(javax.naming.directory.Attributes rootEntry)
Sets root entry that will be added to the Partition after it is initialized.


getSuffix

public java.lang.String getSuffix()
Returns the suffix of the Partition.


getNormalizedSuffix

public javax.naming.Name getNormalizedSuffix(MatchingRuleRegistry matchingRuleRegistry)
                                      throws javax.naming.NamingException
Returns the normalized suffix of the Partition.

Throws:
javax.naming.NamingException

getNormalizedSuffix

public javax.naming.Name getNormalizedSuffix(org.apache.directory.shared.ldap.schema.Normalizer normalizer)
                                      throws javax.naming.NamingException
Returns the normalized suffix of the Partition.

Throws:
javax.naming.NamingException

setSuffix

protected void setSuffix(java.lang.String suffix)
                  throws javax.naming.NamingException
Sets the suffix of the Partition.

Throws:
javax.naming.NamingException

validate

public void validate()
Validates this configuration.

Throws:
ConfigurationException - if this configuration is not valid

setCacheSize

protected void setCacheSize(int cacheSize)
Used to specify the entry cache size for a partition. Various partition implementations may interpret this value in different ways: i.e. total cache size limit verses the number of entries to cache.

Parameters:
cacheSize - the size of the cache

getCacheSize

public int getCacheSize()
Get's the entry cache size for this partition.



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