Class VersionGCRecommendations
- java.lang.Object
-
- org.apache.jackrabbit.oak.plugins.document.VersionGCRecommendations
-
public class VersionGCRecommendations extends java.lang.Object
Gives a recommendation about parameters for the next revision garbage collection run.
-
-
Constructor Summary
Constructors Constructor 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.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
evaluate(VersionGarbageCollector.VersionGCStats stats)
Evaluate the results of the last run.
-
-
-
Constructor Detail
-
VersionGCRecommendations
public 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.
In the settings collection, recommendations keeps "revisionsOlderThan" from the last successful run. It also updates the time interval recommended for the next run.
- Parameters:
maxRevisionAgeMs
- the minimum age for revisions to be collectedcheckpoints
- checkpoints fromDocumentNodeStore
clock
- clock fromDocumentNodeStore
vgc
- VersionGC support classoptions
- options for running the gcgcMonitor
- monitor class for messages
-
-
Method Detail
-
evaluate
public void evaluate(VersionGarbageCollector.VersionGCStats stats)
Evaluate the results of the last run. Update recommendations for future runs. Will setVersionGarbageCollector.VersionGCStats.needRepeat
if collection needs to run another iteration for collecting documents up to "now".- Parameters:
stats
- the statistics from the last run
-
-