public class VersionGCSupport
extends java.lang.Object
Constructor and Description |
---|
VersionGCSupport(DocumentStore store) |
Modifier and Type | Method and Description |
---|---|
protected SplitDocumentCleanUp |
createCleanUp(java.util.Set<NodeDocument.SplitDocType> gcTypes,
RevisionVector sweepRevs,
long oldestRevTimeStamp,
VersionGarbageCollector.VersionGCStats stats) |
long |
getDeletedOnceCount() |
@NotNull DocumentStore |
getDocumentStore()
Returns the underlying document store.
|
long |
getOldestDeletedOnceTimestamp(Clock clock,
long precisionMs)
Retrieve the time of the oldest document marked as 'deletedOnce'.
|
java.lang.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 java.lang.Iterable<NodeDocument> |
identifyGarbage(java.util.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 java.lang.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(java.util.Set<NodeDocument.SplitDocType> gcTypes, RevisionVector sweepRevs, long oldestRevTimeStamp, VersionGarbageCollector.VersionGCStats stats)
protected java.lang.Iterable<NodeDocument> identifyGarbage(java.util.Set<NodeDocument.SplitDocType> gcTypes, RevisionVector sweepRevs, long oldestRevTimeStamp)
public long getOldestDeletedOnceTimestamp(Clock clock, long precisionMs)
precisionMs
- the exact time may vary by given precisionpublic long getDeletedOnceCount() throws java.lang.UnsupportedOperationException
java.lang.UnsupportedOperationException
protected 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–2022 The Apache Software Foundation. All rights reserved.