Class AzureCheck.Builder
java.lang.Object
org.apache.jackrabbit.oak.segment.azure.tool.AzureCheck.Builder
- Enclosing class:
- AzureCheck
Collect options for the
Check command.-
Method Summary
Modifier and TypeMethodDescriptionbuild()Create an executable version of theCheckcommand.withBlobContainerClient(com.azure.storage.blob.BlobContainerClient blobContainerClient) The Azure blob directory to connect to.withCheckBinaries(boolean checkBinaries) Instruct the command to scan the full content of binary properties.withCheckHead(boolean checkHead) Instruct the command to check head state.withCheckpoints(Set<String> checkpoints) Instruct the command to check specified checkpoints.withDebugInterval(long debugInterval) Number of seconds between successive debug print statements.withErrWriter(PrintWriter errWriter) The text error stream writer used to print erroneous output.withFailFast(boolean failFast) Instruct the command to fail fast if the first path/revision checked is inconsistent.withFilterPaths(Set<String> filterPaths) Content paths to be checked.withIOStatistics(boolean ioStatistics) Instruct the command to print statistics about I/O operations performed during the check.withJournal(String journal) The path to the journal of the segment store.withOutWriter(PrintWriter outWriter) The text output stream writer used to print normal output.The path to an existing segment store.withPersistentCachePath(String persistentCachePath) The path where segments in the persistent cache will be stored.withPersistentCacheSizeGb(Integer persistentCacheSizeGb) The maximum size in GB of the persistent disk cache.withRepositoryStatistics(org.apache.jackrabbit.oak.segment.tool.Check.RepositoryStatistics repoStatistics) Attach a repository statistics instance to collect info on nodes and properties checked on head.withRevisionsCount(Integer revisionsCount) Instruct the command to check only the lastrevisionsCountrevisions.withRootPrefix(String rootPrefix) The root prefix to an existing segment store.
-
Method Details
-
withPath
The path to an existing segment store. This parameter is required.- Parameters:
path- the path to an existing segment store.- Returns:
- this builder.
-
withRootPrefix
The root prefix to an existing segment store. This parameter is required.- Parameters:
rootPrefix-- Returns:
- this builder.
-
withJournal
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
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
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
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
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
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
Content paths to be checked. This parameter is not required and defaults to "/".- Parameters:
filterPaths- paths to be checked- Returns:
- this builder.
-
withIOStatistics
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 AzureCheck.Builder withRepositoryStatistics(org.apache.jackrabbit.oak.segment.tool.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
The text output stream writer used to print normal output.- Parameters:
outWriter- the output writer.- Returns:
- this builder.
-
withErrWriter
The text error stream writer used to print erroneous output.- Parameters:
errWriter- the error writer.- Returns:
- this builder.
-
withFailFast
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.
-
withPersistentCachePath
The path where segments in the persistent cache will be stored.- Parameters:
persistentCachePath- the path to the persistent cache.- Returns:
- this builder
-
withPersistentCacheSizeGb
The maximum size in GB of the persistent disk cache.- Parameters:
persistentCacheSizeGb- the maximum size of the persistent cache.- Returns:
- this builder
-
withBlobContainerClient
public AzureCheck.Builder withBlobContainerClient(com.azure.storage.blob.BlobContainerClient blobContainerClient) The Azure blob directory to connect to.- Parameters:
blobContainerClient- the Azure blob directory.- Returns:
- this builder
-
build
Create an executable version of theCheckcommand.- Returns:
- an instance of
Runnable.
-