@Test public void singleTransactionShouldReturnAllValues() throws Exception { TestSubscriber<Object> t = new TestSubscriber<>(); Connection c = mock(Connection.class); ConnectionPool.of(c) .execute(connection -> just(1, 2)) .withSingleTransaction() .subscribe(t); t.assertValues(1, 2); }
public TransactionContextExecutor<T> withSingleTransaction() { return new TransactionContextExecutor<>(SINGLE_TRANSACTION_TRANSACTION_CONTEXT, provider, connectionConsumer); }
TransactionContextExecutor extends Observable<T> { public TransactionContextExecutor<T> withSingleTransaction() { return new TransactionContextExecutor<>(SINGLE_TRANSACTION_TRANSACTION_CONTEXT, provider, connectionConsumer); } }
TransactionContextExecutor extends Observable<T> { public TransactionContextExecutor<T> withSingleTransaction() { return new TransactionContextExecutor<>(SINGLE_TRANSACTION_TRANSACTION_CONTEXT, provider, connectionConsumer); } TransactionContextExecutor(
    TransactionContext transactionContext,
    ConnectionProvider provider,
    ConnectionConsumer<T> connectionConsumer
  ); }
TransactionContextExecutor extends Observable<T> { public TransactionContextExecutor<T> withSingleTransaction() { return new TransactionContextExecutor<>(SINGLE_TRANSACTION_TRANSACTION_CONTEXT, provider, connectionConsumer); } TransactionContextExecutor(
    TransactionContext transactionContext,
    ConnectionProvider provider,
    ConnectionConsumer<T> connectionConsumer
  ); TransactionContextExecutor<T> withAutoCommit(); TransactionContextExecutor<T> withSingleTransaction(); TransactionContextExecutor<T> withTransactionPerEvent(); }
TransactionContextExecutor extends Observable<T> { public TransactionContextExecutor<T> withSingleTransaction() { return new TransactionContextExecutor<>(SINGLE_TRANSACTION_TRANSACTION_CONTEXT, provider, connectionConsumer); } TransactionContextExecutor(
    TransactionContext transactionContext,
    ConnectionProvider provider,
    ConnectionConsumer<T> connectionConsumer
  ); TransactionContextExecutor<T> withAutoCommit(); TransactionContextExecutor<T> withSingleTransaction(); TransactionContextExecutor<T> withTransactionPerEvent(); static final AutoCommitTransactionContext AUTO_COMMIT_TRANSACTION_CONTEXT; static final SingleTransactionTransactionContext SINGLE_TRANSACTION_TRANSACTION_CONTEXT; static final TransactionPerEventTransactionContext TRANSACTION_PER_EVENT_TRANSACTION_CONTEXT; }