public void testClearInterruptsFlush() throws Exception { FlushCounter handler = new FlushCounter(); SortedOplogSetImpl sos = prepSoplogSet("clearDuringFlush"); sos.testDelayDuringFlush = new CountDownLatch(1); sos.flush(null, handler); sos.clear(); flushAndWait(handler, sos); validateEmpty(sos); assertEquals(2, handler.flushes.get()); }
@Override public void destroy() throws IOException { if (logger.fineEnabled()) { logger.fine("Destroying soplog set"); } long start = factory.getConfiguration().getStatistics().getDestroy().begin(); try { unsetCurrent(); clear(); close(); factory.getConfiguration().getStatistics().getDestroy().end(start); } catch (IOException e) { factory.getConfiguration().getStatistics().getDestroy().error(start); throw (IOException) e.fillInStackTrace(); } }