@Override protected void commit() throws IOException { LOG.log(Level.FINE, "Committed:{0}", getRootDir()); try { for (File f : deleted) { f.delete(); } flushFiles(true); } finally { clean(); } }
private void maybeFlush() throws IOException { if (disableCache || memExhausted) { LOG.log(Level.FINE, "Memory exhausted:{0}", getRootDir()); flushFiles(false); memExhausted = false; createCacheRef(); } }
private void flushFiles(boolean inCommit) throws IOException { LOG.log(Level.FINE, "Flushing:{0}", getRootDir()); doFlushFiles(contentCache.first(), inCommit); doFlushFiles(contentCache.second(), inCommit); }