@Override public void close() { try { deletionPolicy.release(ID); } catch (IOException e) { // TODO What to do here? throw new RuntimeException("Unable to close lucene index snapshot", e); } }
/** * Deletes a snapshotted commit by ID. Once this method returns, the snapshot information is * committed to the directory. * * @see SnapshotDeletionPolicy#release(String) */ @Override public synchronized void release(String id) throws IOException { super.release(id); persistSnapshotInfos(null, null); }