Class NodeDocumentRevisionCleaner


  • public class NodeDocumentRevisionCleaner
    extends Object
    This is a prototype class of a very fine-grained revision cleaner that cleans even revisions in-between checkpoints. It is not clear if it will be used for now. A version is considered to be cleanable if it is not referenced by any checkpoint and is older than a certain threshold.
    • Constructor Detail

      • NodeDocumentRevisionCleaner

        public NodeDocumentRevisionCleaner​(DocumentNodeStore documentNodeStore,
                                           NodeDocument workingDocument)
        Constructor for NodeDocumentRevisionCleaner.
        Parameters:
        documentNodeStore - The DocumentNodeStore instance.
        workingDocument - The document to clean up.
      • NodeDocumentRevisionCleaner

        public NodeDocumentRevisionCleaner​(DocumentNodeStore documentNodeStore,
                                           NodeDocument workingDocument,
                                           long toModifiedMs)
        Constructor for NodeDocumentRevisionCleaner.
        Parameters:
        documentNodeStore - The DocumentNodeStore instance.
        workingDocument - The document to clean up.
    • Method Detail

      • collectOldRevisions

        public void collectOldRevisions​(UpdateOp op)
        Collects cleanable old revisions for the given document.
      • classifyRevisionsAndProperties

        protected void classifyRevisionsAndProperties()
      • markLastRevisionForEachProperty

        protected void markLastRevisionForEachProperty()
      • markRevisionsNewerThanThresholdToPreserve

        protected void markRevisionsNewerThanThresholdToPreserve​(long amount,
                                                                 ChronoUnit unit)
      • markCheckpointRevisionsToPreserve

        protected void markCheckpointRevisionsToPreserve()
      • removeCandidatesInList

        protected void removeCandidatesInList()