@Override public void rollback(TransactionId txid) throws IOException { Tx tx = removeTx(txid); if (tx != null) { for (Map.Entry<TransactionStore, TransactionId> storeTx : tx.getStoresMap().entrySet()) { TransactionId recovered = storeTx.getValue(); if (recovered != null) { storeTx.getKey().rollback(recovered); } else { storeTx.getKey().rollback(txid); } } } }
public void process(JournalCommand<?> command) throws IOException { switch (command.type()) { case KAHA_PREPARE_COMMAND: KahaPrepareCommand prepareCommand = (KahaPrepareCommand) command; getTx(TransactionIdConversion.convert(prepareCommand.getTransactionInfo())); break; case KAHA_COMMIT_COMMAND: KahaCommitCommand commitCommand = (KahaCommitCommand) command; removeTx(TransactionIdConversion.convert(commitCommand.getTransactionInfo())); break; case KAHA_TRACE_COMMAND: break; default: throw new IOException("Unexpected command in transaction journal: " + command); } }
removeTx(txid); if (postCommit != null) { postCommit.run();
@Override public void rollback(TransactionId txid) throws IOException { Tx tx = removeTx(txid); if (tx != null) { for (TransactionStore store : tx.getStores()) { store.rollback(txid); } } }
@Override public void rollback(TransactionId txid) throws IOException { Tx tx = removeTx(txid); if (tx != null) { for (TransactionStore store : tx.getStores()) { store.rollback(txid); } } }
@Override public void rollback(TransactionId txid) throws IOException { Tx tx = removeTx(txid); if (tx != null) { for (TransactionStore store : tx.getStores()) { store.rollback(txid); } } }
public void process(JournalCommand<?> command) throws IOException { switch (command.type()) { case KAHA_PREPARE_COMMAND: KahaPrepareCommand prepareCommand = (KahaPrepareCommand) command; getTx(TransactionIdConversion.convert(prepareCommand.getTransactionInfo())); break; case KAHA_COMMIT_COMMAND: KahaCommitCommand commitCommand = (KahaCommitCommand) command; removeTx(TransactionIdConversion.convert(commitCommand.getTransactionInfo())); break; case KAHA_TRACE_COMMAND: break; default: throw new IOException("Unexpected command in transaction journal: " + command); } }
public void process(JournalCommand<?> command) throws IOException { switch (command.type()) { case KAHA_PREPARE_COMMAND: KahaPrepareCommand prepareCommand = (KahaPrepareCommand) command; getTx(TransactionIdConversion.convert(prepareCommand.getTransactionInfo())); break; case KAHA_COMMIT_COMMAND: KahaCommitCommand commitCommand = (KahaCommitCommand) command; removeTx(TransactionIdConversion.convert(commitCommand.getTransactionInfo())); break; case KAHA_TRACE_COMMAND: break; default: throw new IOException("Unexpected command in transaction journal: " + command); } }
public void process(JournalCommand<?> command) throws IOException { switch (command.type()) { case KAHA_PREPARE_COMMAND: KahaPrepareCommand prepareCommand = (KahaPrepareCommand) command; getTx(TransactionIdConversion.convert(prepareCommand.getTransactionInfo())); break; case KAHA_COMMIT_COMMAND: KahaCommitCommand commitCommand = (KahaCommitCommand) command; removeTx(TransactionIdConversion.convert(commitCommand.getTransactionInfo())); break; case KAHA_TRACE_COMMAND: break; default: throw new IOException("Unexpected command in transaction journal: " + command); } }
removeTx(txid); if (postCommit != null) { postCommit.run();
removeTx(txid); if (postCommit != null) { postCommit.run();
removeTx(txid); if (postCommit != null) { postCommit.run();