use of org.apache.jena.tdb.base.block.Block in project jena by apache.
the class AbstractTestBlockMgr method file01.
@Test
public void file01() {
Block block = blockMgr.allocate(BlkSize);
ByteBuffer bb = block.getByteBuffer();
fill(bb, (byte) 1);
blockMgr.write(block);
blockMgr.release(block);
}
use of org.apache.jena.tdb.base.block.Block in project jena by apache.
the class BlockMgrJournal method getWrite.
@Override
public Block getWrite(long id) {
// NB: If we are in a stack of BlockMgrs, after a transaction has committed,
// we would be called via getRead and the upper Blockgr does the promotion.
checkActive();
checkIfClosed();
Block block = localBlock(id);
if (block != null)
return block;
// Get-as-read.
block = blockMgr.getRead(id);
// If most blocks get modified, then a copy is needed
// anyway so now is as good a time as any.
block = _promote(block);
return block;
}
Aggregations