public class VersionGCSupport extends Object
| Constructor and Description |
|---|
VersionGCSupport(DocumentStore store) |
| Modifier and Type | Method and Description |
|---|---|
protected SplitDocumentCleanUp |
createCleanUp(Set<NodeDocument.SplitDocType> gcTypes,
RevisionVector sweepRevs,
long oldestRevTimeStamp,
VersionGarbageCollector.VersionGCStats stats) |
long |
getDeletedOnceCount() |
@NotNull DocumentStore |
getDocumentStore()
Returns the underlying document store.
|
long |
getOldestDeletedOnceTimestamp(org.apache.jackrabbit.oak.stats.Clock clock,
long precisionMs)
Retrieve the time of the oldest document marked as 'deletedOnce'.
|
Iterable<NodeDocument> |
getPossiblyDeletedDocs(long fromModified,
long toModified)
Returns documents that have a
NodeDocument.MODIFIED_IN_SECS value
within the given range and the NodeDocument.DELETED set to
true. |
protected Iterable<NodeDocument> |
identifyGarbage(Set<NodeDocument.SplitDocType> gcTypes,
RevisionVector sweepRevs,
long oldestRevTimeStamp) |
protected static boolean |
isDefaultNoBranchSplitNewerThan(NodeDocument doc,
RevisionVector sweepRevs)
Returns
true if the given document is of type
NodeDocument.SplitDocType.DEFAULT_NO_BRANCH and the most recent change on the
document is newer than the sweepRevs. |
public VersionGCSupport(DocumentStore store)
public Iterable<NodeDocument> getPossiblyDeletedDocs(long fromModified, long toModified)
NodeDocument.MODIFIED_IN_SECS value
within the given range and the NodeDocument.DELETED set to
true. The two passed modified timestamps are in milliseconds
since the epoch and the implementation will convert them to seconds at
the granularity of the NodeDocument.MODIFIED_IN_SECS field and
then perform the comparison.fromModified - the lower bound modified timestamp (inclusive)toModified - the upper bound modified timestamp (exclusive)@NotNull public @NotNull DocumentStore getDocumentStore()
protected SplitDocumentCleanUp createCleanUp(Set<NodeDocument.SplitDocType> gcTypes, RevisionVector sweepRevs, long oldestRevTimeStamp, VersionGarbageCollector.VersionGCStats stats)
protected Iterable<NodeDocument> identifyGarbage(Set<NodeDocument.SplitDocType> gcTypes, RevisionVector sweepRevs, long oldestRevTimeStamp)
public long getOldestDeletedOnceTimestamp(org.apache.jackrabbit.oak.stats.Clock clock, long precisionMs)
precisionMs - the exact time may vary by given precisionpublic long getDeletedOnceCount()
throws UnsupportedOperationException
UnsupportedOperationExceptionprotected static boolean isDefaultNoBranchSplitNewerThan(NodeDocument doc, RevisionVector sweepRevs)
true if the given document is of type
NodeDocument.SplitDocType.DEFAULT_NO_BRANCH and the most recent change on the
document is newer than the sweepRevs.doc - the document to check.sweepRevs - the current sweep revisions.true if the document is a NodeDocument.SplitDocType.DEFAULT_NO_BRANCH
and it is newer than sweepRevs; false otherwise.Copyright © 2012–2018 The Apache Software Foundation. All rights reserved.