@Override public void prepare() throws TransactionException { if (state != ACTIVE) { throw new TransactionNotActiveException("Transaction is not active"); } checkTimeout(); try { state = PREPARING; List<Future> futures = transactionLog.prepare(nodeEngine); waitWithDeadline(futures, timeoutMillis, MILLISECONDS, RETHROW_TRANSACTION_EXCEPTION); futures.clear(); putTransactionInfoRemote(); state = PREPARED; } catch (Throwable e) { throw ExceptionUtil.rethrow(e, TransactionException.class); } }
@Override public void prepare() throws TransactionException { if (state != ACTIVE) { throw new TransactionNotActiveException("Transaction is not active"); } checkTimeout(); try { state = PREPARING; List<Future> futures = transactionLog.prepare(nodeEngine); waitWithDeadline(futures, timeoutMillis, MILLISECONDS, RETHROW_TRANSACTION_EXCEPTION); futures.clear(); putTransactionInfoRemote(); state = PREPARED; } catch (Throwable e) { throw ExceptionUtil.rethrow(e, TransactionException.class); } }
@Override public void prepare() throws TransactionException { if (state != ACTIVE) { throw new TransactionNotActiveException("Transaction is not active"); } checkThread(); checkTimeout(); try { createBackupLogs(); state = PREPARING; List<Future> futures = transactionLog.prepare(nodeEngine); waitUntilAllRespondedWithDeadline(futures, timeoutMillis, MILLISECONDS, RETHROW_TRANSACTION_EXCEPTION); state = PREPARED; replicateTxnLog(); } catch (Throwable e) { throw rethrow(e, TransactionException.class); } }
@Override public void prepare() throws TransactionException { if (state != ACTIVE) { throw new TransactionNotActiveException("Transaction is not active"); } checkThread(); checkTimeout(); try { createBackupLogs(); state = PREPARING; List<Future> futures = transactionLog.prepare(nodeEngine); waitUntilAllRespondedWithDeadline(futures, timeoutMillis, MILLISECONDS, RETHROW_TRANSACTION_EXCEPTION); state = PREPARED; replicateTxnLog(); } catch (Throwable e) { throw rethrow(e, TransactionException.class); } }