@Override public void commit() throws IOException { if (index instanceof Index.Transactional) { ((Index.Transactional)index).commit(); } }
@Override public void rollback() throws IOException { if (index instanceof Index.Transactional) { ((Index.Transactional)index).rollback(); } }
@Override public void deleteAndFlush(List<Pair<Pair<BinaryName, String>, Object[]>> refs, Set<Pair<String, String>> toDelete) throws IOException { resetPkgCache(); if (index instanceof Index.Transactional) { ((Index.Transactional)index).txStore(refs, toDelete, DocumentUtil.documentConvertor(), DocumentUtil.queryClassConvertor()); } else { // fallback to the old behaviour deleteAndStore(refs, toDelete); } }