private void set(int i, boolean value) { if (value) { set(i); } else { clear(i); } }
private void removeUnusedChunks(TreeSet<Long> removedPages) { int size = removedPages.size(); for (BTreeChunk c : findUnusedChunks(removedPages)) { c.fileStorage.close(); c.fileStorage.delete(); chunks.remove(c.id); chunkIds.clear(c.id); removedPages.removeAll(c.pagePositions); } if (size > removedPages.size()) { writeChunkMetaData(lastChunk.id, removedPages); } }
/** * Remove the given object from the meta data. * * @param session the session * @param id the id of the object to remove */ public void removeMeta(ServerSession session, int id) { if (id > 0 && !starting) { SearchRow r = meta.getTemplateSimpleRow(false); r.setValue(0, ValueInt.get(id)); Cursor cursor = metaIdIndex.find(session, r, r); if (cursor.next()) { Row found = cursor.get(); meta.removeRow(session, found); synchronized (objectIds) { objectIds.clear(id); } } } }