@Override
    public void run() {
      Region rgn = myCache.getRegion(rgnName);
      final CacheTransactionManager txMgr = myCache.getCacheTransactionManager();
      txMgr.begin();
      ((TXStateProxyImpl) ((TXManagerImpl) txMgr).getTXState()).forceLocalBootstrap();
      TXState txState = (TXState) ((TXStateProxyImpl) ((TXManagerImpl) txMgr).getTXState())
          .getRealDeal(null, null);
      txState.setAfterReservation(() -> {
        try {
          synchronized (PausibleTX.class) {
            isRunning = true;
            // Notify the thread that created this, that we are ready
            PausibleTX.class.notifyAll();
            // Wait for the controller to start a GII and let us proceed
            PausibleTX.class.wait();
          }
        } catch (InterruptedException ie) {
          // PausibleTX.this.myCache.getLogger().info("Why was I interrupted? " + ie);
          fail("interrupted");
        }
      });
      txState.setAfterSend(() -> {
        try {
          synchronized (PausibleTX.class) {
            // Notify the controller that we have sent the TX data (and the
            // update)
            PausibleTX.class.notifyAll();
            // Wait until the controller has determined in fact the update
            // took place
            PausibleTX.class.wait();
          }
        } catch (InterruptedException ie) {
          // PausibleTX.this.myCache.getLogger().info("Why was I interrupted? " + ie);
          fail("interrupted");
        }
      });
      try {
        rgn.put(key, value);
        txMgr.commit();
      } catch (CommitConflictException cce) {
        fail(
            "Did not expect commit conflict exception when sending updates to new members in PausibleTX"
                + cce);
        // } catch (CacheException ce) {
        // fail("Did not expect cache exception when sending updates to new members in PausibleTX" +
        // ce);
      }
    }
A class used in testLockBatchParticipantsUpdate to pause a transaction in the afterResrvation
and afterSend states.
geode-core/src/distributedTest/java/org/apache/geode/cache30/TXDistributedDUnitTest.java