Constructor PersistentSnapshotDeletionPolicy
PersistentSnapshotDeletionPolicy(IndexDeletionPolicy, Directory)
PersistentSnapshotDeletionPolicy wraps another IndexDeletionPolicy to enable flexible snapshotting, passing CREATE_OR_APPEND by default.
Declaration
public PersistentSnapshotDeletionPolicy(IndexDeletionPolicy primary, Directory dir)
Parameters
Type | Name | Description |
---|---|---|
IndexDeletionPolicy | primary | the IndexDeletionPolicy that is used on non-snapshotted commits. Snapshotted commits, by definition, are not deleted until explicitly released via Release(IndexCommit). |
Directory | dir | the Directory which will be used to persist the snapshots information. |
PersistentSnapshotDeletionPolicy(IndexDeletionPolicy, Directory, OpenMode)
PersistentSnapshotDeletionPolicy wraps another IndexDeletionPolicy to enable flexible snapshotting.
Declaration
public PersistentSnapshotDeletionPolicy(IndexDeletionPolicy primary, Directory dir, OpenMode mode)
Parameters
Type | Name | Description |
---|---|---|
IndexDeletionPolicy | primary | the IndexDeletionPolicy that is used on non-snapshotted commits. Snapshotted commits, by definition, are not deleted until explicitly released via Release(IndexCommit). |
Directory | dir | the Directory which will be used to persist the snapshots information. |
OpenMode | mode | specifies whether a new index should be created, deleting all existing snapshots information (immediately), or open an existing index, initializing the class with the snapshots information. |