use of org.apache.jena.tdb.store.nodetable.NodeTableNative in project jena by apache.
the class NodeTableTrans method begin.
@Override
public void begin(Transaction txn) {
if (this.txn.getTxnId() != txn.getTxnId())
throw new TDBException(String.format("Different transactions: %s %s", this.txn.getLabel(), txn.getLabel()));
if (passthrough)
throw new TDBException("Already active");
passthrough = false;
allocOffset = base.allocOffset().getId();
// base node table empty e.g. first use.
journalObjFileStartOffset = journalObjFile.length();
// always empty at the start of a transaction.
if (journalObjFileStartOffset != 0)
warn(log, "%s journalStartOffset not zero: %d/0x%02X", txn.getLabel(), journalObjFileStartOffset, journalObjFileStartOffset);
allocOffset += journalObjFileStartOffset;
this.nodeTableJournal = new NodeTableNative(nodeIndex, journalObjFile);
this.nodeTableJournal = NodeTableCache.create(nodeTableJournal, CacheSize, CacheSize, 100);
// This class knows about non-mappable inline values. mapToJournal(NodeId)/mapFromJournal.
this.nodeTableJournal = NodeTableInline.create(nodeTableJournal);
}
Aggregations