
KeepLastNCommitsPolicy
- Namespace
- Rowles.LeanCorpus.Index.Indexer
- Assembly
- Rowles.LeanCorpus.dll
Keeps the last N commit generations, deleting older ones.
public sealed class KeepLastNCommitsPolicy : IIndexDeletionPolicy
- Inheritance
-
KeepLastNCommitsPolicy
- Implements
KeepLastNCommitsPolicy(int)
Initialises a new policy that retains the last maxCommits commit generations.
OnCommit(string, int)
Called after a new commit is written. The implementation should delete any commit files (and their segments) that are no longer needed.
OnCommit(string, int, IReadOnlySet<string>)
Called after a new commit is written, with the set of segment IDs protected by held snapshots.