@Test public abstract void testDirectCommit() throws Exception;
final ListenableFuture<Boolean> directCommit() { checkReadWrite(); checkSealed(); synchronized (this) { if (STATE_UPDATER.compareAndSet(this, SEALED, FLUSHED)) { final SettableFuture<Boolean> ret = SettableFuture.create(); sendRequest(verifyNotNull(commitRequest(false)), t -> { if (t instanceof TransactionCommitSuccess) { ret.set(Boolean.TRUE); } else if (t instanceof RequestFailure) { final Throwable cause = ((RequestFailure<?, ?>) t).getCause().unwrap(); if (cause instanceof ClosedTransactionException) { ret.set(Boolean.TRUE); } else { ret.setException(cause); } } else { ret.setException(unhandledResponseException(t)); } LOG.debug("Transaction {} directCommit completed", this); enqueuePurge(); }); return ret; } } return awaitSuccessor().directCommit(); }
AbstractProxyTransaction implements Identifiable<TransactionIdentifier> { final ListenableFuture<Boolean> directCommit() { checkReadWrite(); checkSealed(); synchronized (this) { if (STATE_UPDATER.compareAndSet(this, SEALED, FLUSHED)) { final SettableFuture<Boolean> ret = SettableFuture.create(); sendRequest(verifyNotNull(commitRequest(false)), t -> { if (t instanceof TransactionCommitSuccess) { ret.set(Boolean.TRUE); } else if (t instanceof RequestFailure) { final Throwable cause = ((RequestFailure<?, ?>) t).getCause().unwrap(); if (cause instanceof ClosedTransactionException) { ret.set(Boolean.TRUE); } else { ret.setException(cause); } } else { ret.setException(unhandledResponseException(t)); } LOG.debug("Transaction {} directCommit completed", this); enqueuePurge(); }); return ret; } } return awaitSuccessor().directCommit(); } }
AbstractProxyTransaction implements Identifiable<TransactionIdentifier> { final ListenableFuture<Boolean> directCommit() { checkReadWrite(); checkSealed(); synchronized (this) { if (STATE_UPDATER.compareAndSet(this, SEALED, FLUSHED)) { final SettableFuture<Boolean> ret = SettableFuture.create(); sendRequest(verifyNotNull(commitRequest(false)), t -> { if (t instanceof TransactionCommitSuccess) { ret.set(Boolean.TRUE); } else if (t instanceof RequestFailure) { final Throwable cause = ((RequestFailure<?, ?>) t).getCause().unwrap(); if (cause instanceof ClosedTransactionException) { ret.set(Boolean.TRUE); } else { ret.setException(cause); } } else { ret.setException(unhandledResponseException(t)); } LOG.debug("Transaction {} directCommit completed", this); enqueuePurge(); }); return ret; } } return awaitSuccessor().directCommit(); } AbstractProxyTransaction(final ProxyHistory parent, final boolean isDone); }
AbstractProxyTransaction implements Identifiable<TransactionIdentifier> { final ListenableFuture<Boolean> directCommit() { checkReadWrite(); checkSealed(); synchronized (this) { if (STATE_UPDATER.compareAndSet(this, SEALED, FLUSHED)) { final SettableFuture<Boolean> ret = SettableFuture.create(); sendRequest(verifyNotNull(commitRequest(false)), t -> { if (t instanceof TransactionCommitSuccess) { ret.set(Boolean.TRUE); } else if (t instanceof RequestFailure) { final Throwable cause = ((RequestFailure<?, ?>) t).getCause().unwrap(); if (cause instanceof ClosedTransactionException) { ret.set(Boolean.TRUE); } else { ret.setException(cause); } } else { ret.setException(unhandledResponseException(t)); } LOG.debug("Transaction {} directCommit completed", this); enqueuePurge(); }); return ret; } } return awaitSuccessor().directCommit(); } AbstractProxyTransaction(final ProxyHistory parent, final boolean isDone); @Override final String toString(); }
AbstractProxyTransaction implements Identifiable<TransactionIdentifier> { final ListenableFuture<Boolean> directCommit() { checkReadWrite(); checkSealed(); synchronized (this) { if (STATE_UPDATER.compareAndSet(this, SEALED, FLUSHED)) { final SettableFuture<Boolean> ret = SettableFuture.create(); sendRequest(verifyNotNull(commitRequest(false)), t -> { if (t instanceof TransactionCommitSuccess) { ret.set(Boolean.TRUE); } else if (t instanceof RequestFailure) { final Throwable cause = ((RequestFailure<?, ?>) t).getCause().unwrap(); if (cause instanceof ClosedTransactionException) { ret.set(Boolean.TRUE); } else { ret.setException(cause); } } else { ret.setException(unhandledResponseException(t)); } LOG.debug("Transaction {} directCommit completed", this); enqueuePurge(); }); return ret; } } return awaitSuccessor().directCommit(); } AbstractProxyTransaction(final ProxyHistory parent, final boolean isDone); @Override final String toString();  }