private TXStateProxy internalSuspend(boolean needToResumeBySameThread) {
    TXStateProxy result = getTXState();
    if (result != null) {
      result.suspend();
      if (needToResumeBySameThread) {
        setTXState(PAUSED);
      } else {
        setTXState(null);
      }
    } else {
      if (needToResumeBySameThread) {
        // pausedJTA is set to true when JTA is not yet bootstrapped.
        pauseJTA.set(true);
      }
    }
    return result;
  }
If the current thread is in a transaction then suspend will cause it to no longer be in a
transaction.

@param needToResumeBySameThread whether a suspended transaction needs to be resumed by the same
       thread.
@return the state of the transaction or null. Pass this value to
        {@link TXManagerImpl#internalResume(TXStateProxy, boolean)} to reactivate the suspended
        transaction.
geode-core/src/main/java/org/apache/geode/internal/cache/TXManagerImpl.java