/** * Return the {@link ITransactionService}. */ protected ITransactionService getTxService() { final IIndexManager indexManager = getIndexManager(); final ITransactionService txService; if (indexManager instanceof IJournal) { txService = ((IJournal) indexManager).getLocalTransactionManager() .getTransactionService(); } else { txService = ((AbstractFederation<?>) indexManager) .getTransactionService(); } return txService; }
/** * Return the {@link ITransactionService}. */ protected ITransactionService getTxService() { final IIndexManager indexManager = getIndexManager(); final ITransactionService txService; if (indexManager instanceof IJournal) { txService = ((IJournal) indexManager).getLocalTransactionManager() .getTransactionService(); } else { txService = ((AbstractFederation<?>) indexManager) .getTransactionService(); } return txService; }
/** * Abort a transaction obtained by {@link #newTx(long)}. This decements the * native active transaction counter for the RWStore. Once that counter * reaches zero, recycling will occur the next time an unisolated mutation * goes through a commit on the journal. * * @param tx * The transaction identifier. */ public void abortTx(final long tx) { if (getIndexManager() instanceof IJournal) { final ITransactionService txs = ((IJournal) getIndexManager()) .getLocalTransactionManager().getTransactionService(); try { txs.abort(tx); } catch (IOException e) { // Note: Local operation. Will not throw IOException. throw new RuntimeException(e); } } }
/** * Commit a transaction obtained by {@link #newTx(long)} * * @param tx * The transaction identifier. * * @see <a href="http://trac.bigdata.com/ticket/1156"> Support read/write * transactions in the REST API</a> */ public void commitTx(final long tx) { if (getIndexManager() instanceof IJournal) { final ITransactionService txs = ((IJournal) getIndexManager()) .getLocalTransactionManager().getTransactionService(); try { txs.commit(tx); } catch (IOException e) { // Note: Local operation. Will not throw IOException. throw new RuntimeException(e); } } }
/** * Abort a transaction obtained by {@link #newTx(long)}. This decements the * native active transaction counter for the RWStore. Once that counter * reaches zero, recycling will occur the next time an unisolated mutation * goes through a commit on the journal. * * @param tx * The transaction identifier. */ public void abortTx(final long tx) { if (getIndexManager() instanceof IJournal) { final ITransactionService txs = ((IJournal) getIndexManager()) .getLocalTransactionManager().getTransactionService(); try { txs.abort(tx); } catch (IOException e) { // Note: Local operation. Will not throw IOException. throw new RuntimeException(e); } } }
/** * Commit a transaction obtained by {@link #newTx(long)} * * @param tx * The transaction identifier. * * @see <a href="http://trac.bigdata.com/ticket/1156"> Support read/write * transactions in the REST API</a> */ public void commitTx(final long tx) { if (getIndexManager() instanceof IJournal) { final ITransactionService txs = ((IJournal) getIndexManager()) .getLocalTransactionManager().getTransactionService(); try { txs.commit(tx); } catch (IOException e) { // Note: Local operation. Will not throw IOException. throw new RuntimeException(e); } } }
.getLocalTransactionManager().getTransactionService();
.getLocalTransactionManager().getTransactionService();
return journal.getLocalTransactionManager().nextTimestamp();
return journal.getLocalTransactionManager().nextTimestamp();
.getLocalTransactionManager().getTransactionService();
.getLocalTransactionManager().getTransactionService();
final ITx tx = journal.getLocalTransactionManager().getTx( timestamp); final ITx tx = journal.getLocalTransactionManager().getTx( timestamp);
final ITx tx = journal.getLocalTransactionManager().getTx( timestamp); final ITx tx = journal.getLocalTransactionManager().getTx( timestamp);
.getLocalTransactionManager().getTx(timestamp) .getReadsOnCommitTime();
.getLocalTransactionManager().getTx(timestamp) .getReadsOnCommitTime();