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 void
assertNoOpenTranslogRefs()
protected long
currentTime()
long
getMinTranslogGenerationForRecovery()
returns the translog generation that will be used as a basis of a future store/peer recoverylong
getTranslogGenerationOfLastCommit()
Returns a translog generation that will be used to calculate the number of uncommitted operations since the last index commit.void
setMinTranslogGenerationForRecovery(long newGen)
void
setRetentionAgeInMillis(long ageInMillis)
void
setRetentionSizeInBytes(long bytes)
void
setTranslogGenerationOfLastCommit(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.
-
-