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