Class 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.
    • 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
        1. if gc shall run at all (ignoreDueToCheckPoint)
        2. in which time interval documents shall be collected (scope)
        3. 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.

        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 collected
        checkpoints - checkpoints from DocumentNodeStore
        clock - clock from DocumentNodeStore
        vgc - VersionGC support class
        options - options for running the gc
        gcMonitor - monitor class for messages