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 classConsistencyChecker.ConsistencyCheckResultstatic classConsistencyChecker.Revision
-
Constructor Summary
Constructors Constructor Description ConsistencyChecker()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ConsistencyChecker.ConsistencyCheckResultcheckConsistency(ReadOnlyFileStore store, Iterator<JournalEntry> journal, boolean head, Set<String> checkpoints, Set<String> paths, boolean binaries, Integer revisionsCount)ConsistencyChecker.ConsistencyCheckResultcheckConsistency(ReadOnlyFileStore store, Iterator<JournalEntry> journal, boolean head, Set<String> checkpoints, Set<String> paths, boolean binaries, Integer revisionsCount, boolean failFast)StringcheckTreeConsistency(NodeState root, Set<String> corruptedPaths, boolean binaries)Check the consistency of a given subtree and returns the first inconsistent path.protected voidonCheckCheckpoint(String checkpoint)protected voidonCheckChekpoints()protected voidonCheckHead()protected voidonCheckNode(String path)protected voidonCheckNodeError(String path, Exception e)protected voidonCheckpointNotFoundInRevision(String checkpoint)protected voidonCheckProperty()protected voidonCheckPropertyEnd(String path, PropertyState property)protected voidonCheckRevision(String revision)protected voidonCheckRevisionError(String revision, Exception e)protected voidonCheckTree(String path, boolean head)protected voidonCheckTreeEnd(boolean head)protected voidonCheckTreeError(String path, Exception e)protected voidonConsistentPath(String path)protected voidonPathNotFound(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)
-
-