public class VersionGCRecommendations
extends java.lang.Object
Constructor and Description |
---|
VersionGCRecommendations(long maxRevisionAgeMs,
org.apache.jackrabbit.oak.plugins.document.Checkpoints checkpoints,
Clock clock,
VersionGCSupport vgc,
VersionGCOptions options,
GCMonitor gcMonitor)
With the given maximum age of revisions to keep (earliest time in the past to collect),
the desired precision in which times shall be sliced and the given limit on the number
of collected documents in one run, calculate
if gc shall run at all (ignoreDueToCheckPoint)
in which time interval documents shall be collected (scope)
if collection should fail if it reaches maxCollect documents, maxCollect will specify
the limit or be 0 if no limit shall be enforced.
After a run, recommendations evaluate the result of the gc to update its persisted recommendations
for future runs.
|
Modifier and Type | Method and Description |
---|---|
void |
evaluate(VersionGarbageCollector.VersionGCStats stats)
Evaluate the results of the last run.
|
public VersionGCRecommendations(long maxRevisionAgeMs, org.apache.jackrabbit.oak.plugins.document.Checkpoints checkpoints, Clock clock, VersionGCSupport vgc, VersionGCOptions options, GCMonitor gcMonitor)
In the settings collection, recommendations keeps "revisionsOlderThan" from the last successful run. It also updates the time interval recommended for the next run.
maxRevisionAgeMs
- the minimum age for revisions to be collectedcheckpoints
- checkpoints from DocumentNodeStore
clock
- clock from DocumentNodeStore
vgc
- VersionGC support classoptions
- options for running the gcgcMonitor
- monitor class for messagespublic void evaluate(VersionGarbageCollector.VersionGCStats stats)
VersionGarbageCollector.VersionGCStats.needRepeat
if collection needs to run another
iteration for collecting documents up to "now".stats
- the statistics from the last runCopyright © 2012–2022 The Apache Software Foundation. All rights reserved.