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)
-
Method Summary
Modifier and Type Method Description voidassertNoOpenTranslogRefs()protected longcurrentTime()longgetMinTranslogGenerationForRecovery()returns the translog generation that will be used as a basis of a future store/peer recoverylonggetTranslogGenerationOfLastCommit()Returns a translog generation that will be used to calculate the number of uncommitted operations since the last index commit.voidsetMinTranslogGenerationForRecovery(long newGen)voidsetRetentionAgeInMillis(long ageInMillis)voidsetRetentionSizeInBytes(long bytes)voidsetTranslogGenerationOfLastCommit(long lastGen)Sets the translog generation of the last index commit.
-
-
-
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.
-
-