- @Override
- public synchronized CheckedFuture<Void, TransactionCommitFailedException> submit() {
- final ListenableFuture<Void> commitFutureAsVoid = Futures.transform(commitConfiguration(), input -> {
- Preconditions.checkArgument(input.isSuccessful() && input.getErrors().isEmpty(),
- "Submit failed with errors: %s", input.getErrors());
- return null;
- }, MoreExecutors.directExecutor());
-
- return Futures.makeChecked(commitFutureAsVoid, input -> new TransactionCommitFailedException(
- "Submit of transaction " + getIdentifier() + " failed", input));
- }
-