public void masqueradeAs(TXStateProxy txState) {
    assert txState != null;
    if (!txState.getLock().isHeldByCurrentThread()) {
      txState.getLock().lock();
    }
    setTXState(txState);
    if (logger.isDebugEnabled()) {
      logger.debug("masqueradeAs tx {}", txState);
    }
  }
Associate the transactional state with this thread.

@param txState the transactional state.
geode-core/src/main/java/org/apache/geode/internal/cache/TXManagerImpl.java