use of org.apache.jena.tdb.base.block.BlockException in project jena by apache.
the class BlockMgrJournal method getReadIterator.
@Override
public Block getReadIterator(long id) {
// logState() ;
checkIfClosed();
Block block = localBlock(id);
if (block == null)
block = blockMgr.getReadIterator(id);
if (block == null)
throw new BlockException("No such block: " + getLabel() + " " + id);
if (active)
iteratorBlocks.add(block.getId());
return block;
}
use of org.apache.jena.tdb.base.block.BlockException in project jena by apache.
the class BlockAccessBase method check.
protected final void check(Block block) {
check(block.getId());
ByteBuffer bb = block.getByteBuffer();
if (bb.capacity() != blockSize)
throw new BlockException(format("BlockMgrFile: Wrong size block. Expected=%d : actual=%d", blockSize, bb.capacity()));
if (bb.order() != SystemTDB.NetworkOrder)
throw new BlockException("BlockMgrFile: Wrong byte order");
}
Aggregations