Class TranslogDeletionPolicy


  • public class TranslogDeletionPolicy
    extends java.lang.Object
    • Constructor Detail

      • TranslogDeletionPolicy

        public TranslogDeletionPolicy​(long retentionSizeInBytes,
                                      long retentionAgeInMillis)
    • Method Detail

      • assertNoOpenTranslogRefs

        public void assertNoOpenTranslogRefs()
      • setMinTranslogGenerationForRecovery

        public void setMinTranslogGenerationForRecovery​(long newGen)
      • setTranslogGenerationOfLastCommit

        public void setTranslogGenerationOfLastCommit​(long lastGen)
        Sets the translog generation of the last index commit.
      • setRetentionSizeInBytes

        public void setRetentionSizeInBytes​(long bytes)
      • setRetentionAgeInMillis

        public void setRetentionAgeInMillis​(long ageInMillis)
      • currentTime

        protected long currentTime()
      • getMinTranslogGenerationForRecovery

        public long getMinTranslogGenerationForRecovery()
        returns the translog generation that will be used as a basis of a future store/peer recovery
      • getTranslogGenerationOfLastCommit

        public long getTranslogGenerationOfLastCommit()
        Returns a translog generation that will be used to calculate the number of uncommitted operations since the last index commit.