Class DfsFsck


  • public class DfsFsck
    extends java.lang.Object
    Verify the validity and connectivity of a DFS repository.
    • Constructor Detail

      • DfsFsck

        public DfsFsck​(DfsRepository repository)
        Initialize DFS fsck.
        Parameters:
        repository - the dfs repository to check.
    • Method Detail

      • check

        public FsckError check​(ProgressMonitor pm)
                        throws java.io.IOException
        Verify the integrity and connectivity of all objects in the object database.
        Parameters:
        pm - callback to provide progress feedback during the check.
        Returns:
        all errors about the repository.
        Throws:
        java.io.IOException - if encounters IO errors during the process.
      • checkPacks

        private void checkPacks​(ProgressMonitor pm,
                                FsckError errors)
                         throws java.io.IOException,
                                java.io.FileNotFoundException
        Throws:
        java.io.IOException
        java.io.FileNotFoundException
      • checkGitModules

        private void checkGitModules​(ProgressMonitor pm,
                                     FsckError errors)
                              throws java.io.IOException
        Throws:
        java.io.IOException
      • checkConnectivity

        private void checkConnectivity​(ProgressMonitor pm,
                                       FsckError errors)
                                throws java.io.IOException
        Throws:
        java.io.IOException
      • setObjectChecker

        public void setObjectChecker​(ObjectChecker objChecker)
        Use a customized object checker instead of the default one. Caller can specify a skip list to ignore some errors. It will be reset at the start of each {check(ProgressMonitor) call.
        Parameters:
        objChecker - A customized object checker.
      • setConnectivityOnly

        public void setConnectivityOnly​(boolean connectivityOnly)
        Whether fsck should bypass object validity and integrity checks and only check connectivity.
        Parameters:
        connectivityOnly - whether fsck should bypass object validity and integrity checks and only check connectivity. The default is false, meaning to run all checks.