Class RebuildConfig


  • public class RebuildConfig
    extends Object
    Configuration for the indexType rebuild process.
    • Constructor Detail

      • RebuildConfig

        public RebuildConfig()
    • 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.
      • isClearDegradedState

        public boolean isClearDegradedState()
        Returns true if indexes should be forcefully marked as valid even if they are currently degraded.
        Returns:
        true if index should be forcefully marked as valid.
      • isClearDegradedState

        public void isClearDegradedState​(boolean isClearDegradedState)
        Sets the 'clear degraded index' status.
        Parameters:
        isClearDegradedState - true if indexes should be forcefully marked as valid even if they are currently degraded.