@Override
  public void setDistributed(boolean flag) {
    checkClosed();
    TXStateProxy tx = getTXState();
    // Check whether given flag and current flag are different and whether a transaction is in
    // progress
    if (tx != null && flag != isDistributed()) {
      // Cannot change mode in the middle of a transaction
      throw new java.lang.IllegalStateException(
          "Transaction mode cannot be changed when the thread has an active transaction");
    } else {
      isTXDistributed.set(flag);
    }
  }
Find all client originated transactions sent from the departed proxy server. Remove them from
the hostedTXStates map after the set TransactionTimeToLive period.

@param proxyServer the departed proxy server
geode-core/src/main/java/org/apache/geode/internal/cache/TXManagerImpl.java