Class SegmentRevisionGCMBean

    • Method Detail

      • getRetryCount

        public int getRetryCount()
        Description copied from interface: SegmentRevisionGC
        Get the number of tries to compact concurrent commits on top of already compacted commits
        Specified by:
        getRetryCount in interface SegmentRevisionGC
        Returns:
        retry count
      • setRetryCount

        public void setRetryCount​(int retryCount)
        Description copied from interface: SegmentRevisionGC
        Set the number of tries to compact concurrent commits on top of already compacted commits
        Specified by:
        setRetryCount in interface SegmentRevisionGC
      • getForceTimeout

        public int getForceTimeout()
        Description copied from interface: SegmentRevisionGC
        Get the number of seconds to attempt to force compact concurrent commits on top of already compacted commits after the maximum number of retries has been reached. Forced compaction acquires an exclusive write lock on the node store.
        Specified by:
        getForceTimeout in interface SegmentRevisionGC
        Returns:
        the number of seconds until forced compaction gives up and the exclusive write lock on the node store is released.
      • setForceTimeout

        public void setForceTimeout​(int timeout)
        Description copied from interface: SegmentRevisionGC
        Set the number of seconds to attempt to force compact concurrent commits on top of already compacted commits after the maximum number of retries has been reached. Forced compaction acquires an exclusively write lock on the node store.
        Specified by:
        setForceTimeout in interface SegmentRevisionGC
        Parameters:
        timeout - the number of seconds until forced compaction gives up and the exclusive lock on the node store is released.
      • setRetainedGenerations

        public void setRetainedGenerations​(int retainedGenerations)
        Description copied from interface: SegmentRevisionGC
        Set the number of segment generations to retain: each compaction run creates a new segment generation. retainGenerations determines how many of those generations are retained during cleanup.
        Specified by:
        setRetainedGenerations in interface SegmentRevisionGC
        Parameters:
        retainedGenerations - number of generations to retain. Must be >= 2.
      • cancelRevisionGC

        public void cancelRevisionGC()
        Description copied from interface: SegmentRevisionGC
        Cancel a running revision garbage collection operation. Does nothing if revision garbage collection is not running.
        Specified by:
        cancelRevisionGC in interface SegmentRevisionGC
      • getLastCompaction

        public long getLastCompaction()
        Specified by:
        getLastCompaction in interface SegmentRevisionGC
        Returns:
        time of the last compaction in milliseconds.
      • getLastCleanup

        public long getLastCleanup()
        Specified by:
        getLastCleanup in interface SegmentRevisionGC
        Returns:
        time of the last cleanup in milliseconds.
      • getLastError

        @Nullable
        public @Nullable java.lang.String getLastError()
        Specified by:
        getLastError in interface SegmentRevisionGC
        Returns:
        last error or null if none.
      • getLastLogMessage

        @NotNull
        public @NotNull java.lang.String getLastLogMessage()
        Specified by:
        getLastLogMessage in interface SegmentRevisionGC
        Returns:
        last log message or null if none.
      • getStatus

        @NotNull
        public @NotNull java.lang.String getStatus()
        Specified by:
        getStatus in interface SegmentRevisionGC
        Returns:
        current status.
      • getMemoryThreshold

        public int getMemoryThreshold()
        Description copied from interface: SegmentRevisionGC
        Get the available memory threshold beyond which revision gc will be canceled. Value represents a percentage so an value between 0 and 100 will be returned.
        Specified by:
        getMemoryThreshold in interface SegmentRevisionGC
        Returns:
        memory threshold
      • setMemoryThreshold

        public void setMemoryThreshold​(int memoryThreshold)
        Description copied from interface: SegmentRevisionGC
        Set the available memory threshold beyond which revision gc will be canceled. Value represents a percentage so an input between 0 and 100 is expected. Setting this to 0 will disable the check.
        Specified by:
        setMemoryThreshold in interface SegmentRevisionGC
      • isRevisionGCRunning

        public boolean isRevisionGCRunning()
        Specified by:
        isRevisionGCRunning in interface SegmentRevisionGC
        Returns:
        true if there is an online compaction cycle running
      • getCompactedNodes

        public long getCompactedNodes()
        Specified by:
        getCompactedNodes in interface SegmentRevisionGC
        Returns:
        number of compacted nodes in the current cycle
      • getEstimatedCompactableNodes

        public long getEstimatedCompactableNodes()
        Specified by:
        getEstimatedCompactableNodes in interface SegmentRevisionGC
        Returns:
        number of estimated nodes to be compacted in the current cycle. Can be -1 if the estimation can't be performed
      • getEstimatedRevisionGCCompletion

        public int getEstimatedRevisionGCCompletion()
        Specified by:
        getEstimatedRevisionGCCompletion in interface SegmentRevisionGC
        Returns:
        percentage of progress for the current compaction cycle. Can be -1 if the estimation can't be performed.
      • getRevisionGCProgressLog

        public long getRevisionGCProgressLog()
        Specified by:
        getRevisionGCProgressLog in interface SegmentRevisionGC
        Returns:
        Number of nodes the monitor will log a message, -1 means disabled
      • setRevisionGCProgressLog

        public void setRevisionGCProgressLog​(long gcProgressLog)
        Description copied from interface: SegmentRevisionGC
        Set the size of the logging interval, -1 means disabled
        Specified by:
        setRevisionGCProgressLog in interface SegmentRevisionGC
        Parameters:
        gcProgressLog - number of nodes