- @CheckReturnValue
- default @NonNull FluentFuture<? extends @NonNull CommitInfo> commit() {
- return FluentFuture.from(submit()).transformAsync(ignored -> CommitInfo.emptyFluentFuture(),
- MoreExecutors.directExecutor());
- }
+ @NonNull FluentFuture<? extends @NonNull CommitInfo> commit();
+
+ /**
+ * This only exists for reuse by the deprecated {@link #submit} method and is not intended for general use.
+ */
+ @Deprecated
+ ExceptionMapper<TransactionCommitFailedException> SUBMIT_EXCEPTION_MAPPER =
+ new ExceptionMapper<TransactionCommitFailedException>("submit", TransactionCommitFailedException.class) {
+ @Override
+ protected TransactionCommitFailedException newWithCause(final String message, final Throwable cause) {
+ return new TransactionCommitFailedException(message, cause);
+ }
+ };