public List<ManagedResource> cleanupBridgeClientResources(String clientId) {
    List<ManagedResource> returnedResources = new ArrayList<>();

    String compatibleId = "id_" + MBeanUtils.makeCompliantMBeanNameProperty(clientId);
    synchronized (managedStatisticsResourcesMap) {
      Set<Entry<StatResource, StatisticResourceJmxImpl>> entrySet =
          managedStatisticsResourcesMap.entrySet();

      for (Iterator<Entry<StatResource, StatisticResourceJmxImpl>> it = entrySet.iterator(); it
          .hasNext();) {
        Entry<StatResource, StatisticResourceJmxImpl> entry = it.next();
        StatisticResourceJmxImpl resource = entry.getValue();
        if (resource.getMBeanName().contains(compatibleId)) {
          it.remove(); // remove matching entry
          returnedResources.add(resource);
        }
      }
    }
    return returnedResources;
  }
Cleans up Managed Resources created for the client that was connected to the server represented
by this class.

@param clientId id of the client to be removed
@return List of ManagedResources associated with the client of given client id
geode-core/src/main/java/org/apache/geode/admin/jmx/internal/SystemMemberJmxImpl.java