void free(int pos, int blockCount) { synchronized (database) { used.setRange(pos, blockCount, false); } }
void removeRecord(Session session, int pos, Record record, int blockCount) throws SQLException { synchronized (database) { if (logChanges) { log.add(session, this, record); } cache.remove(pos); deleted.setRange(pos, blockCount, true); setUnused(session, pos, blockCount); } }
private void setBlockOwner(Session session, Storage storage, int pos, int blockCount, boolean inUse) throws SQLException { if (pos + blockCount > fileBlockCount) { setBlockCount(pos + blockCount); } if (!inUse) { setUnused(session, pos, blockCount); } for (int i = getPage(pos); i <= getPage(pos + blockCount - 1); i++) { setPageOwner(i, storage.getId()); } if (inUse) { used.setRange(pos, blockCount, true); deleted.setRange(pos, blockCount, false); } }
deleted.setRange(page * BLOCKS_PER_PAGE, BLOCKS_PER_PAGE, true); setUnused(session, page * BLOCKS_PER_PAGE, BLOCKS_PER_PAGE);