org.opends.server.backends.jeb
Class RebuildConfig

java.lang.Object
  extended by org.opends.server.backends.jeb.RebuildConfig

public class RebuildConfig
extends java.lang.Object

Configuration for the indexType rebuild process.


Constructor Summary
RebuildConfig()
          Create a new rebuild configuraiton.
 
Method Summary
 void addRebuildIndex(java.lang.String index)
          Add an index to be rebuilt into the configuration.
 java.lang.String checkConflicts(RebuildConfig config)
          Check the given config for conflicts with this config.
 DN getBaseDN()
          Get the base DN to rebuild.
 int getMaxRebuildThreads()
          Get the maximum number of rebuild threads to use for the rebuild job at one time.
 java.util.ArrayList<java.lang.String> getRebuildList()
          Get the list of indexes to rebuild in this configuration.
 boolean includesSystemIndex()
          Test if this rebuild config includes any system indexes to rebuild.
 void setBaseDN(DN baseDN)
          Set the base DN to rebuild.
 void setMaxRebuildThreads(int maxRebuildThreads)
          Set the maximum number of rebuild threads to use for the rebuild job at one time.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RebuildConfig

public RebuildConfig()
Create a new rebuild configuraiton.

Method Detail

getBaseDN

public DN getBaseDN()
Get the base DN to rebuild.

Returns:
The base DN to rebuild.

setBaseDN

public void setBaseDN(DN baseDN)
Set the base DN to rebuild.

Parameters:
baseDN - The base DN to rebuild.

getRebuildList

public java.util.ArrayList<java.lang.String> getRebuildList()
Get the list of indexes to rebuild in this configuration.

Returns:
The list of indexes to rebuild.

addRebuildIndex

public void addRebuildIndex(java.lang.String index)
Add an index to be rebuilt into the configuration. Duplicate index names will be ignored. Adding an index that causes a mix of complete and partial rebuild for the same attribute index in the configuration will remove the partial and just keep the complete attribute index name. (ie. uid and uid.presence).

Parameters:
index - The index to add.

checkConflicts

public java.lang.String checkConflicts(RebuildConfig config)
Check the given config for conflicts with this config. A conflict is detected if both configs specify the same indexType/database to be rebuilt.

Parameters:
config - The rebuild config to check against.
Returns:
the name of the indexType causing the conflict or null if no conflict is detected.

getMaxRebuildThreads

public int getMaxRebuildThreads()
Get the maximum number of rebuild threads to use for the rebuild job at one time.

Returns:
The maximum number of rebuild threads.

setMaxRebuildThreads

public void setMaxRebuildThreads(int maxRebuildThreads)
Set the maximum number of rebuild threads to use for the rebuild job at one time.

Parameters:
maxRebuildThreads - The maximum number of rebuild threads.

includesSystemIndex

public boolean includesSystemIndex()
Test if this rebuild config includes any system indexes to rebuild.

Returns:
True if rebuilding of system indexes are included. False otherwise.