Package org.elasticsearch.index.translog
Class TranslogDeletionPolicy
java.lang.Object
org.elasticsearch.index.translog.TranslogDeletionPolicy
public class TranslogDeletionPolicy
extends java.lang.Object
-
Constructor Summary
Constructors Constructor Description TranslogDeletionPolicy(long retentionSizeInBytes, long retentionAgeInMillis, int retentionTotalFiles) -
Method Summary
Modifier and Type Method Description voidassertNoOpenTranslogRefs()protected longcurrentTime()longgetLocalCheckpointOfSafeCommit()Returns the local checkpoint of the safe commit.voidsetLocalCheckpointOfSafeCommit(long newCheckpoint)voidsetRetentionAgeInMillis(long ageInMillis)voidsetRetentionSizeInBytes(long bytes)Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
TranslogDeletionPolicy
public TranslogDeletionPolicy(long retentionSizeInBytes, long retentionAgeInMillis, int retentionTotalFiles)
-
-
Method Details
-
assertNoOpenTranslogRefs
public void assertNoOpenTranslogRefs() -
setLocalCheckpointOfSafeCommit
public void setLocalCheckpointOfSafeCommit(long newCheckpoint) -
setRetentionSizeInBytes
public void setRetentionSizeInBytes(long bytes) -
setRetentionAgeInMillis
public void setRetentionAgeInMillis(long ageInMillis) -
currentTime
protected long currentTime() -
getLocalCheckpointOfSafeCommit
public long getLocalCheckpointOfSafeCommit()Returns the local checkpoint of the safe commit. This value is used to calculate the min required generation for recovery.
-