Package org.opends.server.backends
Class RebuildConfig
- java.lang.Object
-
- org.opends.server.backends.RebuildConfig
-
public class RebuildConfig extends Object
Configuration for the indexType rebuild process.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classRebuildConfig.RebuildModeIdentifies how indexes will be selected for rebuild.
-
Constructor Summary
Constructors Constructor Description RebuildConfig()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddRebuildIndex(String index)Add an index to be rebuilt into the configuration.StringcheckConflicts(RebuildConfig config)Check the given config for conflicts with this config.DNgetBaseDN()Get the base DN to rebuild.List<String>getRebuildList()Get the list of indexes to rebuild in this configuration.RebuildConfig.RebuildModegetRebuildMode()Returns the rebuild mode.StringgetTmpDirectory()Return the temporary directory path.booleanincludesSystemIndex()Test if this rebuild config includes any system indexes to rebuild.booleanisClearDegradedState()Returnstrueif indexes should be forcefully marked as valid even if they are currently degraded.voidisClearDegradedState(boolean isClearDegradedState)Sets the 'clear degraded index' status.voidsetBaseDN(DN baseDN)Set the base DN to rebuild.voidsetRebuildMode(RebuildConfig.RebuildMode mode)Sets the rebuild mode.voidsetTmpDirectory(String path)Set the temporary directory to the specified path.
-
-
-
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 List<String> getRebuildList()
Get the list of indexes to rebuild in this configuration.- Returns:
- The list of indexes to rebuild.
-
addRebuildIndex
public void addRebuildIndex(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 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.
-
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.
-
setTmpDirectory
public void setTmpDirectory(String path)
Set the temporary directory to the specified path.- Parameters:
path- The path to set the temporary directory to.
-
getTmpDirectory
public String getTmpDirectory()
Return the temporary directory path.- Returns:
- The temporary directory string.
-
setRebuildMode
public void setRebuildMode(RebuildConfig.RebuildMode mode)
Sets the rebuild mode.- Parameters:
mode- The new rebuild mode.
-
getRebuildMode
public RebuildConfig.RebuildMode getRebuildMode()
Returns the rebuild mode.- Returns:
- The rebuild mode.
-
isClearDegradedState
public boolean isClearDegradedState()
Returnstrueif indexes should be forcefully marked as valid even if they are currently degraded.- Returns:
trueif index should be forcefully marked as valid.
-
isClearDegradedState
public void isClearDegradedState(boolean isClearDegradedState)
Sets the 'clear degraded index' status.- Parameters:
isClearDegradedState-trueif indexes should be forcefully marked as valid even if they are currently degraded.
-
-