Class Check.Builder
- java.lang.Object
-
- org.apache.jackrabbit.oak.segment.tool.Check.Builder
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Checkbuild()Create an executable version of theCheckcommand.Check.BuilderwithCheckBinaries(boolean checkBinaries)Instruct the command to scan the full content of binary properties.Check.BuilderwithCheckHead(boolean checkHead)Instruct the command to check head state.Check.BuilderwithCheckpoints(Set<String> checkpoints)Instruct the command to check specified checkpoints.Check.BuilderwithDebugInterval(long debugInterval)Number of seconds between successive debug print statements.Check.BuilderwithErrWriter(PrintWriter errWriter)The text error stream writer used to print erroneous output.Check.BuilderwithFailFast(boolean failFast)Instruct the command to fail fast if the first path/revision checked is inconsistent.Check.BuilderwithFilterPaths(Set<String> filterPaths)Content paths to be checked.Check.BuilderwithIOStatistics(boolean ioStatistics)Instruct the command to print statistics about I/O operations performed during the check.Check.BuilderwithJournal(File journal)The path to the journal of the segment store.Check.BuilderwithMmap(boolean mmap)Whether to use memory mapped access or file access.Check.BuilderwithOutWriter(PrintWriter outWriter)The text output stream writer used to print normal output.Check.BuilderwithPath(File path)The path to an existing segment store.Check.BuilderwithRepositoryStatistics(Check.RepositoryStatistics repoStatistics)Attach a repository statistics instance to collect info on nodes and properties checked on head.Check.BuilderwithRevisionsCount(Integer revisionsCount)Instruct the command to check only the lastrevisionsCountrevisions.
-
-
-
Method Detail
-
withPath
public Check.Builder withPath(File path)
The path to an existing segment store. This parameter is required.- Parameters:
path- the path to an existing segment store.- Returns:
- this builder.
-
withMmap
public Check.Builder withMmap(boolean mmap)
Whether to use memory mapped access or file access.- Parameters:
mmap-truefor memory mapped access,falsefor file accessnullto determine the access mode from the system architecture: memory mapped on 64 bit systems, file access on 32 bit systems.- Returns:
- this builder.
-
withJournal
public Check.Builder withJournal(File journal)
The path to the journal of the segment store. This parameter is optional. If not provided, the journal in the default location is used.- Parameters:
journal- the path to the journal of the segment store.- Returns:
- this builder.
-
withDebugInterval
public Check.Builder withDebugInterval(long debugInterval)
Number of seconds between successive debug print statements. This parameter is not required and defaults to an arbitrary large number.- Parameters:
debugInterval- number of seconds between successive debug print statements. It must be positive.- Returns:
- this builder.
-
withCheckBinaries
public Check.Builder withCheckBinaries(boolean checkBinaries)
Instruct the command to scan the full content of binary properties. This parameter is not required and defaults tofalse.- Parameters:
checkBinaries-trueif binary properties should be scanned,falseotherwise.- Returns:
- this builder.
-
withCheckHead
public Check.Builder withCheckHead(boolean checkHead)
Instruct the command to check head state. This parameter is not required and defaults totrue.- Parameters:
checkHead- iftrue, will check the head state.- Returns:
- this builder.
-
withRevisionsCount
public Check.Builder withRevisionsCount(Integer revisionsCount)
Instruct the command to check only the lastrevisionsCountrevisions. This parameter is not required and defaults to1.- Parameters:
revisionsCount- number of revisions to check.- Returns:
- this builder.
-
withCheckpoints
public Check.Builder withCheckpoints(Set<String> checkpoints)
Instruct the command to check specified checkpoints. This parameter is not required and defaults to "/checkpoints", i.e. will check all checkpoints when not explicitly overridden.- Parameters:
checkpoints- checkpoints to be checked- Returns:
- this builder.
-
withFilterPaths
public Check.Builder withFilterPaths(Set<String> filterPaths)
Content paths to be checked. This parameter is not required and defaults to "/".- Parameters:
filterPaths- paths to be checked- Returns:
- this builder.
-
withIOStatistics
public Check.Builder withIOStatistics(boolean ioStatistics)
Instruct the command to print statistics about I/O operations performed during the check. This parameter is not required and defaults tofalse.- Parameters:
ioStatistics-trueif I/O statistics should be provided,falseotherwise.- Returns:
- this builder.
-
withRepositoryStatistics
public Check.Builder withRepositoryStatistics(Check.RepositoryStatistics repoStatistics)
Attach a repository statistics instance to collect info on nodes and properties checked on head.- Parameters:
repoStatistics- instance to collect statistics- Returns:
- this builder.
-
withOutWriter
public Check.Builder withOutWriter(PrintWriter outWriter)
The text output stream writer used to print normal output.- Parameters:
outWriter- the output writer.- Returns:
- this builder.
-
withErrWriter
public Check.Builder withErrWriter(PrintWriter errWriter)
The text error stream writer used to print erroneous output.- Parameters:
errWriter- the error writer.- Returns:
- this builder.
-
withFailFast
public Check.Builder withFailFast(boolean failFast)
Instruct the command to fail fast if the first path/revision checked is inconsistent. This parameter is not required and defaults tofalse.- Parameters:
failFast-trueif the command should fail fast,falseotherwise.- Returns:
- this builder.
-
-