public PersistentSnapshotDeletionPolicy(IndexDeletionPolicy primary,Directory dir, OpenMode mode) throws IOException {super(primary);this.dir = dir;if (mode == OpenMode.CREATE) {clearPriorSnapshots();}loadPriorSnapshots();if (mode == OpenMode.APPEND && nextWriteGen == 0) {throw new IllegalStateException("no snapshots stored in this directory");}}
public PersistentSnapshotDeletionPolicy(IndexDeletionPolicy primary, Directory dir, OpenMode mode): base(primary){this.dir = dir;if (mode == OpenMode.CREATE){ClearPriorSnapshots();}LoadPriorSnapshots();if (mode == OpenMode.APPEND && nextWriteGen == 0){throw new InvalidOperationException("no snapshots stored in this directory");}}