888889890891892893894895896897898
Block block = allocateRow(); blockId = block.getBlockId(); // System.out.println("ALLOC: " + blockId + " " + _rowTailOffset.get() + " " + _rowTailTop); block.free(); } _rowTailOffset.compareAndSet(rowTailOffset, blockId + BLOCK_SIZE); return blockId;
995996997998999100010011002100310041005
_clockRowUsed++; } return isFree; } finally { block.free(); } } private boolean isFreeRowBlockIdAvailable() {
205206207208209210211212213214215
return lookup(keyBuffer, keyOffset, keyLength, value); } finally { blockLock.unlockRead(); } } finally { block.free(); } } /** * Inserts the new value for the given key.
267268269270271272273274275276277
return true; else return insertWriteChild(keyBuffer, keyOffset, keyLength, value, isOverride, block); } finally { block.free(); } } private boolean insertReadChild(byte []keyBuffer, int keyOffset,
517518519520521522523524525526527
validate(block); } finally { blockLock.unlockReadAndWrite(); } } finally { block.free(); } } /** * The length in lBuf is assumed to be the length of the buffer.
607608609610611612613614615616617
leftBlock.setDirty(0, BlockStore.BLOCK_SIZE); parentBlock.setDirty(0, BlockStore.BLOCK_SIZE); } finally { if (leftBlock != null) leftBlock.free(); block.setDirty(0, BlockStore.BLOCK_SIZE); } }
634635636637638639640641642643644
validate(rootBlock); } finally { rootLock.unlockReadAndWrite(); } } finally { rootBlock.free(); } } /** * Splits the current leaf into two. Half of the entries go to the
732733734735736737738739740741742
} finally { if (leftBlock != null) leftBlock.free(); if (rightBlock != null) rightBlock.free(); } } public void remove(byte []keyBuffer, int keyOffset,
151152153154155156157158159160161
public void close() { if (_block != null) { Block block = _block; _block = null; block.free(); } } /** * Updates the buffer.
164165166167168169170171172173174
throws IOException { if (_block != null) { Block block = _block; _block = null; block.free(); } long addr; int blockCount = (int) (_offset / BlockStore.BLOCK_SIZE);