Class ConsistencyChecker


  • public class ConsistencyChecker
    extends java.lang.Object
    • Constructor Detail

      • ConsistencyChecker

        public ConsistencyChecker()
    • Method Detail

      • onCheckRevision

        protected void onCheckRevision​(java.lang.String revision)
      • onCheckHead

        protected void onCheckHead()
      • onCheckChekpoints

        protected void onCheckChekpoints()
      • onCheckCheckpoint

        protected void onCheckCheckpoint​(java.lang.String checkpoint)
      • onCheckpointNotFoundInRevision

        protected void onCheckpointNotFoundInRevision​(java.lang.String checkpoint)
      • onCheckRevisionError

        protected void onCheckRevisionError​(java.lang.String revision,
                                            java.lang.Exception e)
      • onConsistentPath

        protected void onConsistentPath​(java.lang.String path)
      • onPathNotFound

        protected void onPathNotFound​(java.lang.String path)
      • onCheckTree

        protected void onCheckTree​(java.lang.String path,
                                   boolean head)
      • onCheckTreeEnd

        protected void onCheckTreeEnd​(boolean head)
      • onCheckNode

        protected void onCheckNode​(java.lang.String path)
      • onCheckProperty

        protected void onCheckProperty()
      • onCheckPropertyEnd

        protected void onCheckPropertyEnd​(java.lang.String path,
                                          PropertyState property)
      • onCheckNodeError

        protected void onCheckNodeError​(java.lang.String path,
                                        java.lang.Exception e)
      • onCheckTreeError

        protected void onCheckTreeError​(java.lang.String path,
                                        java.lang.Exception e)
      • checkTreeConsistency

        public java.lang.String checkTreeConsistency​(NodeState root,
                                                     java.util.Set<java.lang.String> corruptedPaths,
                                                     boolean binaries)
        Check the consistency of a given subtree and returns the first inconsistent path. If provided, this method probes a set of inconsistent paths before performing a full traversal of the subtree.
        Parameters:
        root - The root node of the subtree.
        corruptedPaths - A set of possibly inconsistent paths.
        binaries - Whether to check binaries for consistency.
        Returns:
        The first inconsistent path or null. The path might be either one of the provided inconsistent paths or a new one discovered during a full traversal of the tree.