Class MongoVersionGCSupport
- java.lang.Object
-
- org.apache.jackrabbit.oak.plugins.document.VersionGCSupport
-
- org.apache.jackrabbit.oak.plugins.document.mongo.MongoVersionGCSupport
-
public class MongoVersionGCSupport extends VersionGCSupport
Mongo specific version of VersionGCSupport which uses mongo queries to fetch required NodeDocumentsVersion collection involves looking into old record and mostly unmodified documents. In such case read from secondaries are preferred
-
-
Constructor Summary
Constructors Constructor Description MongoVersionGCSupport(MongoDocumentStore store)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected SplitDocumentCleanUpcreateCleanUp(java.util.Set<NodeDocument.SplitDocType> gcTypes, RevisionVector sweepRevs, long oldestRevTimeStamp, VersionGarbageCollector.VersionGCStats stats)longgetDeletedOnceCount()longgetOldestDeletedOnceTimestamp(org.apache.jackrabbit.oak.stats.Clock clock, long precisionMs)Retrieve the time of the oldest document marked as 'deletedOnce'.CloseableIterable<NodeDocument>getPossiblyDeletedDocs(long fromModified, long toModified)Returns documents that have aNodeDocument.MODIFIED_IN_SECSvalue within the given range and theNodeDocument.DELETEDset totrue.protected java.lang.Iterable<NodeDocument>identifyGarbage(java.util.Set<NodeDocument.SplitDocType> gcTypes, RevisionVector sweepRevs, long oldestRevTimeStamp)-
Methods inherited from class org.apache.jackrabbit.oak.plugins.document.VersionGCSupport
getDocumentStore, isDefaultNoBranchSplitNewerThan
-
-
-
-
Constructor Detail
-
MongoVersionGCSupport
public MongoVersionGCSupport(MongoDocumentStore store)
-
-
Method Detail
-
getPossiblyDeletedDocs
public CloseableIterable<NodeDocument> getPossiblyDeletedDocs(long fromModified, long toModified)
Description copied from class:VersionGCSupportReturns documents that have aNodeDocument.MODIFIED_IN_SECSvalue within the given range and theNodeDocument.DELETEDset totrue. The two passed modified timestamps are in milliseconds since the epoch and the implementation will convert them to seconds at the granularity of theNodeDocument.MODIFIED_IN_SECSfield and then perform the comparison.- Overrides:
getPossiblyDeletedDocsin classVersionGCSupport- Parameters:
fromModified- the lower bound modified timestamp (inclusive)toModified- the upper bound modified timestamp (exclusive)- Returns:
- matching documents.
-
getDeletedOnceCount
public long getDeletedOnceCount()
- Overrides:
getDeletedOnceCountin classVersionGCSupport
-
createCleanUp
protected SplitDocumentCleanUp createCleanUp(java.util.Set<NodeDocument.SplitDocType> gcTypes, RevisionVector sweepRevs, long oldestRevTimeStamp, VersionGarbageCollector.VersionGCStats stats)
- Overrides:
createCleanUpin classVersionGCSupport
-
identifyGarbage
protected java.lang.Iterable<NodeDocument> identifyGarbage(java.util.Set<NodeDocument.SplitDocType> gcTypes, RevisionVector sweepRevs, long oldestRevTimeStamp)
- Overrides:
identifyGarbagein classVersionGCSupport
-
getOldestDeletedOnceTimestamp
public long getOldestDeletedOnceTimestamp(org.apache.jackrabbit.oak.stats.Clock clock, long precisionMs)Description copied from class:VersionGCSupportRetrieve the time of the oldest document marked as 'deletedOnce'.- Overrides:
getOldestDeletedOnceTimestampin classVersionGCSupportprecisionMs- the exact time may vary by given precision- Returns:
- the timestamp of the oldest document marked with 'deletecOnce', module given prevision. If no such document exists, returns the max time inspected (close to current time).
-
-