public TXStateProxy removeHostedTXState(TXId txId, boolean causedByFailover) {
    synchronized (hostedTXStates) {
      TXStateProxy result = hostedTXStates.remove(txId);
      if (result != null) {
        result.close();
        if (causedByFailover) {
          ((TXStateProxyImpl) result).setRemovedCausedByFailover(true);
        }
      }
      return result;
    }
  }
Cleanup the txState

@return the TXStateProxy
geode-core/src/main/java/org/apache/geode/internal/cache/TXManagerImpl.java