/** Close this store. */ public void close() { try { if (fileLock != null) { fileLock.release(); fileLock = null; } file.close(); freeSpace.clear(); } catch (Exception e) { throw DataUtils.newIllegalStateException( DataUtils.ERROR_WRITING_FAILED, "Closing failed for file {0}", fileName, e); } finally { file = null; } }
/** Mark the file as empty. */ public void clear() { freeSpace.clear(); }