@Override public void commit(TransactionId txid, boolean wasPrepared, Runnable preCommit, Runnable postCommit) throws IOException { if (preCommit != null) { preCommit.run(); } Tx tx; if (wasPrepared) { tx = preparedTransactions.get(txid); } else { tx = inflightTransactions.remove(txid); } if (tx != null) { tx.commit(); } if (wasPrepared) { preparedTransactions.remove(txid); } if (postCommit != null) { postCommit.run(); } }
@Override public void commit(TransactionId txid, boolean wasPrepared, Runnable preCommit, Runnable postCommit) throws IOException { if (preCommit != null) { preCommit.run(); } Tx tx; if (wasPrepared) { tx = preparedTransactions.remove(txid); } else { tx = inflightTransactions.remove(txid); } if (tx != null) { tx.commit(); } if (postCommit != null) { postCommit.run(); } }
@Override public void commit(TransactionId txid, boolean wasPrepared, Runnable preCommit, Runnable postCommit) throws IOException { if (preCommit != null) { preCommit.run(); } Tx tx; if (wasPrepared) { tx = preparedTransactions.remove(txid); } else { tx = inflightTransactions.remove(txid); } if (tx != null) { tx.commit(); } if (postCommit != null) { postCommit.run(); } }
public void commit(TransactionId txid, boolean wasPrepared, Runnable preCommit,Runnable postCommit) throws IOException { if (preCommit != null) { preCommit.run(); } Tx tx; if (wasPrepared) { tx = preparedTransactions.remove(txid); } else { tx = inflightTransactions.remove(txid); } if (tx == null) { if (postCommit != null) { postCommit.run(); } return; } // ensure message order w.r.t to cursor and store for setBatch() synchronized (this) { tx.commit(); if (postCommit != null) { postCommit.run(); } } }
@Override public void commit(TransactionId txid, boolean wasPrepared, Runnable preCommit, Runnable postCommit) throws IOException { if (preCommit != null) { preCommit.run(); } Tx tx; if (wasPrepared) { tx = preparedTransactions.remove(txid); } else { tx = inflightTransactions.remove(txid); } if (tx != null) { tx.commit(); } if (postCommit != null) { postCommit.run(); } }