public class RepositorySidegrade extends Object
Constructor and Description |
---|
RepositorySidegrade(org.apache.jackrabbit.oak.spi.state.NodeStore source,
org.apache.jackrabbit.oak.spi.state.NodeStore target)
Creates a tool for copying the full contents of the source repository
to the given target repository.
|
Modifier and Type | Method and Description |
---|---|
void |
copy()
Copies the full content from the source to the target repository.
|
List<org.apache.jackrabbit.oak.spi.commit.CommitHook> |
getCustomCommitHooks()
Returns the list of custom CommitHooks to be applied before the final
type validation, reference and indexing hooks.
|
void |
setCopyOrphanedVersions(Calendar minDate)
Configures copying of the orphaned version histories (eg.
|
void |
setCopyVersions(Calendar minDate)
Configures the version storage copy.
|
void |
setCustomCommitHooks(List<org.apache.jackrabbit.oak.spi.commit.CommitHook> customCommitHooks)
Sets the list of custom CommitHooks to be applied before the final
type validation, reference and indexing hooks.
|
void |
setExcludes(String... excludes)
Sets the paths that should be excluded when the source repository
is copied to the target repository.
|
void |
setFilterLongNames(boolean filterLongNames) |
void |
setForceCheckpoints(boolean forceCheckpoints) |
void |
setIncludes(String... includes)
Sets the paths that should be included when the source repository
is copied to the target repository.
|
void |
setMerges(String... merges)
Sets the paths that should be merged when the source repository
is copied to the target repository.
|
void |
setMigrateDocumentMetadata(boolean migrateDocumentMetadata) |
void |
setOnlyVerify(boolean onlyVerify) |
void |
setSkipCheckpoints(boolean skipCheckpoints) |
void |
setVerify(boolean verify) |
public RepositorySidegrade(org.apache.jackrabbit.oak.spi.state.NodeStore source, org.apache.jackrabbit.oak.spi.state.NodeStore target)
source
- source node storetarget
- target node storepublic void setCopyVersions(Calendar minDate)
null
here or limit it to
a selected date range: <minDate, now()>
.minDate
- minimum date of the versions to copy or null
to
disable the storage version copying completely. Default value:
1970-01-01 00:00:00
.public void setCopyOrphanedVersions(Calendar minDate)
null
here or limit it to a selected date range:
<minDate, now()>
. setCopyVersions(Calendar)
. You can't copy orphaned versions
older than set in setCopyVersions(Calendar)
and if you set
null
there, this option will be ignored.minDate
- minimum date of the orphaned versions to copy or null
to not copy them at all. Default value:
1970-01-01 00:00:00
.public List<org.apache.jackrabbit.oak.spi.commit.CommitHook> getCustomCommitHooks()
public void setCustomCommitHooks(List<org.apache.jackrabbit.oak.spi.commit.CommitHook> customCommitHooks)
customCommitHooks
- the list of custom CommitHookspublic void setIncludes(@NotNull String... includes)
includes
- Paths to be included in the copy.public void setExcludes(@NotNull String... excludes)
excludes
- Paths to be excluded from the copy.public void setMerges(@NotNull String... merges)
merges
- Paths to be merged during copy.public void setFilterLongNames(boolean filterLongNames)
public void setVerify(boolean verify)
public void setOnlyVerify(boolean onlyVerify)
public void setSkipCheckpoints(boolean skipCheckpoints)
public void setForceCheckpoints(boolean forceCheckpoints)
public void setMigrateDocumentMetadata(boolean migrateDocumentMetadata)
public void copy() throws RepositoryException
The source repository must not be modified while the copy operation is running to avoid an inconsistent copy.
Note that both the source and the target repository must be closed during the copy operation as this method requires exclusive access to the repositories.
RepositoryException
- if the copy operation failsCopyright © 2012–2019 The Apache Software Foundation. All rights reserved.