use of org.apache.jena.dboe.base.buffer.RecordBuffer in project jena by apache.
the class BPlusTreeRewriter method copyBPTreeNode.
private static void copyBPTreeNode(BPTreeNode nodeSrc, BPTreeNode nodeDst, BPlusTree bpt2) {
PtrBuffer pBuff = nodeSrc.getPtrBuffer();
pBuff.copy(0, nodeDst.getPtrBuffer(), 0, pBuff.getSize());
RecordBuffer rBuff = nodeSrc.getRecordBuffer();
rBuff.copy(0, nodeDst.getRecordBuffer(), 0, rBuff.getSize());
nodeDst.setCount(nodeSrc.getCount());
nodeDst.setIsLeaf(nodeSrc.isLeaf());
bpt2.getNodeManager().put(nodeDst);
}
use of org.apache.jena.dboe.base.buffer.RecordBuffer in project jena by apache.
the class RecordBufferPagePacker method hasNext.
@Override
public boolean hasNext() {
if (recordBufferPage == null) {
if (records == null)
return false;
if (!records.hasNext()) {
records = null;
return false;
}
// At least one record to be processed.
// No pending RecordBufferPage
// ==> There will be a RecordBufferPage to yield.
// int id = rbMgr.allocateId();
// //System.out.println("Allocate : "+id);
recordBufferPage = rbMgr.create();
RecordBuffer rb = recordBufferPage.getRecordBuffer();
while (!rb.isFull() && records.hasNext()) {
Record r = records.next();
rb.add(r);
}
if (!records.hasNext())
records = null;
return true;
}
return true;
}
Aggregations