예제 #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;
    }
예제 #2
0
 @Override
 public ListenableFuture<Void> preCommit() {
   return delegate.preCommit();
 }
예제 #3
0
 @Override
 public ListenableFuture<Void> abort() {
   return delegate.abort();
 }
예제 #4
0
 @Override
 public ListenableFuture<Boolean> canCommit() {
   return delegate.canCommit();
 }