int score = 0; for (char field : tripleComparator.getFieldSeq()) { switch (field) { case 's': default: throw new RuntimeException("invalid character '" + field + "' in field sequence: " + new String(tripleComparator.getFieldSeq()));
int score = 0; for (char field : tripleComparator.getFieldSeq()) { switch (field) { case 's': default: throw new RuntimeException("invalid character '" + field + "' in field sequence: " + new String(tripleComparator.getFieldSeq()));
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); } }
public char[] getFieldSeq() { return tripleComparator.getFieldSeq(); }
public char[] getFieldSeq() { return tripleComparator.getFieldSeq(); }
public TripleIndex(String fieldSeq) throws IOException { tripleComparator = new TripleComparator(fieldSeq); btree = new BTree(dir, getFilenamePrefix(fieldSeq), 2048, RECORD_LENGTH, tripleComparator, forceSync); }
public TripleIndex(String fieldSeq) throws IOException { tripleComparator = new TripleComparator(fieldSeq); btree = new BTree(dir, getFilenamePrefix(fieldSeq), 2048, RECORD_LENGTH, tripleComparator, forceSync); }