@Test public void testCanCommit() throws Exception { final ListenableFuture<Boolean> canCommit = cohort.canCommit(); final ModifyTransactionRequest request = transaction.expectTransactionRequest(ModifyTransactionRequest.class); assertTrue(request.getPersistenceProtocol().isPresent()); assertEquals(PersistenceProtocol.SIMPLE, request.getPersistenceProtocol().get()); final RequestSuccess<?, ?> success = new TransactionCommitSuccess(transaction.getTransaction().getIdentifier(), transaction.getLastReceivedMessage().getSequence()); transaction.replySuccess(success); assertEquals(Boolean.TRUE, getWithTimeout(canCommit)); }
@Override public ListenableFuture<Boolean> canCommit() { return proxy.directCommit(); }
DirectTransactionCommitCohort extends AbstractTransactionCommitCohort { @Override public ListenableFuture<Boolean> canCommit() { return proxy.directCommit(); } }
DirectTransactionCommitCohort extends AbstractTransactionCommitCohort { @Override public ListenableFuture<Boolean> canCommit() { return proxy.directCommit(); } DirectTransactionCommitCohort(final AbstractClientHistory parent, final TransactionIdentifier txId,
        final AbstractProxyTransaction proxy); }
DirectTransactionCommitCohort extends AbstractTransactionCommitCohort { @Override public ListenableFuture<Boolean> canCommit() { return proxy.directCommit(); } DirectTransactionCommitCohort(final AbstractClientHistory parent, final TransactionIdentifier txId,
        final AbstractProxyTransaction proxy); @Override ListenableFuture<Boolean> canCommit(); @Override ListenableFuture<Void> preCommit(); @Override ListenableFuture<Void> abort(); @Override ListenableFuture<Void> commit(); }
DirectTransactionCommitCohort extends AbstractTransactionCommitCohort { @Override public ListenableFuture<Boolean> canCommit() { return proxy.directCommit(); } DirectTransactionCommitCohort(final AbstractClientHistory parent, final TransactionIdentifier txId,
        final AbstractProxyTransaction proxy); @Override ListenableFuture<Boolean> canCommit(); @Override ListenableFuture<Void> preCommit(); @Override ListenableFuture<Void> abort(); @Override ListenableFuture<Void> commit();  }