Beispiel #1
0
    @Override
    public ListenableFuture<Void> commit() {
      ListenableFuture<Void> commitFuture = delegate.commit();
      Futures.addCallback(
          commitFuture,
          new FutureCallback<Void>() {
            @Override
            public void onFailure(final Throwable t) {
              txChain.onTransactionFailed(transaction, t);
            }

            @Override
            public void onSuccess(final Void result) {
              txChain.onTransactionCommited(transaction);
            }
          });
      return commitFuture;
    }
Beispiel #2
0
 @Override
 public ListenableFuture<Void> preCommit() {
   return delegate.preCommit();
 }
Beispiel #3
0
 @Override
 public ListenableFuture<Void> abort() {
   return delegate.abort();
 }
Beispiel #4
0
 @Override
 public ListenableFuture<Boolean> canCommit() {
   return delegate.canCommit();
 }