public void startTransaction() throws IOException { txnStatusFile.setTxnStatus(TxnStatus.ACTIVE); // Create a record cache for storing updated triples with a maximum of // some 10% of the number of triples long maxRecords = indexes.get(0).getBTree().getValueCountEstimate() / 10L; if (updatedTriplesCache == null) { updatedTriplesCache = new SortedRecordCache(dir, RECORD_LENGTH, maxRecords, new TripleComparator("spoc")); } else { assert updatedTriplesCache.getRecordCount() == 0L : "updatedTripleCache should have been cleared upon commit or rollback"; updatedTriplesCache.setMaxRecords(maxRecords); } }
public void startTransaction() throws IOException { txnStatusFile.setTxnStatus(TxnStatus.ACTIVE); // Create a record cache for storing updated triples with a maximum of // some 10% of the number of triples long maxRecords = indexes.get(0).getBTree().getValueCountEstimate() / 10L; if (updatedTriplesCache == null) { updatedTriplesCache = new SortedRecordCache(dir, RECORD_LENGTH, maxRecords, new TripleComparator("spoc")); } else { assert updatedTriplesCache.getRecordCount() == 0L : "updatedTripleCache should have been cleared upon commit or rollback"; updatedTriplesCache.setMaxRecords(maxRecords); } }