public void close(boolean keepAlive) {
    if (isClosed) {
      return;
    }
    // It should go to all the servers it has authenticated itself on and ask
    // them to clean-up its entry from their auth-data structures.
    try {
      if (proxyQueryService != null) {
        proxyQueryService.closeCqs(keepAlive);
      }
      UserAttributes.userAttributes.set(userAttributes);
      for (final ServerLocation serverLocation : userAttributes.getServerToId().keySet()) {
        ProxyCacheCloseOp.executeOn(serverLocation, (ExecutablePool) userAttributes.getPool(),
            userAttributes.getCredentials(), keepAlive);
      }
      List<ProxyCache> proxyCache = ((PoolImpl) userAttributes.getPool()).getProxyCacheList();
      synchronized (proxyCache) {
        proxyCache.remove(this);
      }
    } finally {
      // TODO: I think some NPE will be caused by this code.
      // It would be safer to not null things out.
      // It is really bad that we null out and then set isClosed true.
      isClosed = true;
      proxyQueryService = null;
      userAttributes.setCredentials(null);
      userAttributes = null;
      UserAttributes.userAttributes.set(null);
    }
  }
package-private to avoid synthetic accessor
<p>
TODO: if this is only in inside client then this should be InternalClientCache
geode-core/src/main/java/org/apache/geode/cache/client/internal/ProxyCache.java