コード例 #1
0
 @Override
 public CompletableFuture<Void> visitCommitCommand(TxInvocationContext ctx, CommitCommand command)
     throws Throwable {
   try {
     return ctx.shortCircuit(ctx.forkInvocationSync(command));
   } finally {
     commitContextEntries(ctx, null, null);
   }
 }
コード例 #2
0
 @Override
 public CompletableFuture<Void> visitPrepareCommand(
     TxInvocationContext ctx, PrepareCommand command) throws Throwable {
   wrapEntriesForPrepare(ctx, command);
   Object result = ctx.forkInvocationSync(command);
   if (shouldCommitDuringPrepare(command, ctx)) {
     commitContextEntries(ctx, null, null);
   }
   return ctx.shortCircuit(result);
 }