Class ConsistencyChecker
- java.lang.Object
-
- org.apache.jackrabbit.oak.segment.file.tooling.ConsistencyChecker
-
public class ConsistencyChecker extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ConsistencyChecker.ConsistencyCheckResult
static class
ConsistencyChecker.Revision
-
Constructor Summary
Constructors Constructor Description ConsistencyChecker()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ConsistencyChecker.ConsistencyCheckResult
checkConsistency(ReadOnlyFileStore store, Iterator<JournalEntry> journal, boolean head, Set<String> checkpoints, Set<String> paths, boolean binaries, Integer revisionsCount)
ConsistencyChecker.ConsistencyCheckResult
checkConsistency(ReadOnlyFileStore store, Iterator<JournalEntry> journal, boolean head, Set<String> checkpoints, Set<String> paths, boolean binaries, Integer revisionsCount, boolean failFast)
String
checkTreeConsistency(NodeState root, Set<String> corruptedPaths, boolean binaries)
Check the consistency of a given subtree and returns the first inconsistent path.protected void
onCheckCheckpoint(String checkpoint)
protected void
onCheckChekpoints()
protected void
onCheckHead()
protected void
onCheckNode(String path)
protected void
onCheckNodeError(String path, Exception e)
protected void
onCheckpointNotFoundInRevision(String checkpoint)
protected void
onCheckProperty()
protected void
onCheckPropertyEnd(String path, PropertyState property)
protected void
onCheckRevision(String revision)
protected void
onCheckRevisionError(String revision, Exception e)
protected void
onCheckTree(String path, boolean head)
protected void
onCheckTreeEnd(boolean head)
protected void
onCheckTreeError(String path, Exception e)
protected void
onConsistentPath(String path)
protected void
onPathNotFound(String path)
-
-
-
Method Detail
-
onCheckRevision
protected void onCheckRevision(String revision)
-
onCheckHead
protected void onCheckHead()
-
onCheckChekpoints
protected void onCheckChekpoints()
-
onCheckCheckpoint
protected void onCheckCheckpoint(String checkpoint)
-
onCheckpointNotFoundInRevision
protected void onCheckpointNotFoundInRevision(String checkpoint)
-
onConsistentPath
protected void onConsistentPath(String path)
-
onPathNotFound
protected void onPathNotFound(String path)
-
onCheckTree
protected void onCheckTree(String path, boolean head)
-
onCheckTreeEnd
protected void onCheckTreeEnd(boolean head)
-
onCheckNode
protected void onCheckNode(String path)
-
onCheckProperty
protected void onCheckProperty()
-
onCheckPropertyEnd
protected void onCheckPropertyEnd(String path, PropertyState property)
-
checkTreeConsistency
public String checkTreeConsistency(NodeState root, Set<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.
-
checkConsistency
public final ConsistencyChecker.ConsistencyCheckResult checkConsistency(ReadOnlyFileStore store, Iterator<JournalEntry> journal, boolean head, Set<String> checkpoints, Set<String> paths, boolean binaries, Integer revisionsCount)
-
checkConsistency
public final ConsistencyChecker.ConsistencyCheckResult checkConsistency(ReadOnlyFileStore store, Iterator<JournalEntry> journal, boolean head, Set<String> checkpoints, Set<String> paths, boolean binaries, Integer revisionsCount, boolean failFast)
-
-