use of org.apache.jena.tdb.base.file.BlockAccess in project jena by apache.
the class TestBlockMgrDirect method make.
@Override
protected BlockMgr make() {
// Make directly - no wrapper, no cache, no free block mgt.
FileOps.delete(filename);
BlockAccess file = new BlockAccessDirect(filename, BlkSize);
BlockMgr mgr = new BlockMgrFileAccess(file, BlkSize);
if (BlockMgrFactory.AddTracker)
mgr = BlockMgrFactory.tracker(mgr);
return mgr;
}
use of org.apache.jena.tdb.base.file.BlockAccess in project jena by apache.
the class TestBlockMgrMapped method make.
@Override
protected BlockMgr make() {
clearBlockMgr();
BlockAccess file = new BlockAccessMapped(filename, BlkSize);
return new BlockMgrFileAccess(file, BlkSize);
}
use of org.apache.jena.tdb.base.file.BlockAccess in project jena by apache.
the class AbstractTestBlockAccessVarSize method fileaccess_50.
@Test
public void fileaccess_50() {
BlockAccess file = make();
Block b1 = data(file, 10);
Block b2 = data(file, 20);
file.write(b1);
file.write(b2);
Block b1a = file.read(b1.getId());
Block b2a = file.read(b2.getId());
assertNotSame(b1a, b1);
assertNotSame(b2a, b2);
sameValue(b1, b1a);
sameValue(b2, b2a);
}
Aggregations