@Test public abstract void testCanCommit();
final void canCommit(final VotingFuture<?> ret) { checkReadWrite(); checkSealed(); synchronized (this) { if (STATE_UPDATER.compareAndSet(this, SEALED, FLUSHED)) { final TransactionRequest<?> req = verifyNotNull(commitRequest(true)); sendRequest(req, t -> { if (t instanceof TransactionCanCommitSuccess) { ret.voteYes(); } else if (t instanceof RequestFailure) { ret.voteNo(((RequestFailure<?, ?>) t).getCause().unwrap()); } else { ret.voteNo(unhandledResponseException(t)); } recordSuccessfulRequest(req); LOG.debug("Transaction {} canCommit completed", this); }); return; } } awaitSuccessor().canCommit(ret); }
AbstractProxyTransaction implements Identifiable<TransactionIdentifier> { final void canCommit(final VotingFuture<?> ret) { checkReadWrite(); checkSealed(); synchronized (this) { if (STATE_UPDATER.compareAndSet(this, SEALED, FLUSHED)) { final TransactionRequest<?> req = verifyNotNull(commitRequest(true)); sendRequest(req, t -> { if (t instanceof TransactionCanCommitSuccess) { ret.voteYes(); } else if (t instanceof RequestFailure) { ret.voteNo(((RequestFailure<?, ?>) t).getCause().unwrap()); } else { ret.voteNo(unhandledResponseException(t)); } recordSuccessfulRequest(req); LOG.debug("Transaction {} canCommit completed", this); }); return; } } awaitSuccessor().canCommit(ret); } }
AbstractProxyTransaction implements Identifiable<TransactionIdentifier> { final void canCommit(final VotingFuture<?> ret) { checkReadWrite(); checkSealed(); synchronized (this) { if (STATE_UPDATER.compareAndSet(this, SEALED, FLUSHED)) { final TransactionRequest<?> req = verifyNotNull(commitRequest(true)); sendRequest(req, t -> { if (t instanceof TransactionCanCommitSuccess) { ret.voteYes(); } else if (t instanceof RequestFailure) { ret.voteNo(((RequestFailure<?, ?>) t).getCause().unwrap()); } else { ret.voteNo(unhandledResponseException(t)); } recordSuccessfulRequest(req); LOG.debug("Transaction {} canCommit completed", this); }); return; } } awaitSuccessor().canCommit(ret); } AbstractProxyTransaction(final ProxyHistory parent, final boolean isDone); }
AbstractProxyTransaction implements Identifiable<TransactionIdentifier> { final void canCommit(final VotingFuture<?> ret) { checkReadWrite(); checkSealed(); synchronized (this) { if (STATE_UPDATER.compareAndSet(this, SEALED, FLUSHED)) { final TransactionRequest<?> req = verifyNotNull(commitRequest(true)); sendRequest(req, t -> { if (t instanceof TransactionCanCommitSuccess) { ret.voteYes(); } else if (t instanceof RequestFailure) { ret.voteNo(((RequestFailure<?, ?>) t).getCause().unwrap()); } else { ret.voteNo(unhandledResponseException(t)); } recordSuccessfulRequest(req); LOG.debug("Transaction {} canCommit completed", this); }); return; } } awaitSuccessor().canCommit(ret); } AbstractProxyTransaction(final ProxyHistory parent, final boolean isDone); @Override final String toString(); }
AbstractProxyTransaction implements Identifiable<TransactionIdentifier> { final void canCommit(final VotingFuture<?> ret) { checkReadWrite(); checkSealed(); synchronized (this) { if (STATE_UPDATER.compareAndSet(this, SEALED, FLUSHED)) { final TransactionRequest<?> req = verifyNotNull(commitRequest(true)); sendRequest(req, t -> { if (t instanceof TransactionCanCommitSuccess) { ret.voteYes(); } else if (t instanceof RequestFailure) { ret.voteNo(((RequestFailure<?, ?>) t).getCause().unwrap()); } else { ret.voteNo(unhandledResponseException(t)); } recordSuccessfulRequest(req); LOG.debug("Transaction {} canCommit completed", this); }); return; } } awaitSuccessor().canCommit(ret); } AbstractProxyTransaction(final ProxyHistory parent, final boolean isDone); @Override final String toString();  }