private void doManagementTask(Map<String, FederationComponent> replicaMap) {
    if (logger.isTraceEnabled()) {
      logger.trace("Federation started at managed node : ");
    }

    try {
      synchronized (lock) {
        replicaMap.clear();
        Set<ObjectName> keySet = federatedComponentMap.keySet();
        if (keySet.isEmpty()) {
          return;
        }

        for (ObjectName objectName : keySet) {
          FederationComponent fedCompInstance = federatedComponentMap.get(objectName);

          if (Thread.interrupted()) {
            replicaMap.clear();
            return;
          }

          if (fedCompInstance != null) {
            boolean stateChanged = fedCompInstance.refreshObjectState(service.isManager());
            if (!stopCacheOps) {
              String key = objectName.toString();
              if (stateChanged || !repo.keyExistsInLocalMonitoringRegion(key)) {
                replicaMap.put(key, fedCompInstance);
              }
            }
          }
        }

        if (stopCacheOps) {
          return;
        }
        if (Thread.interrupted()) {
          replicaMap.clear();
          return;
        }
        repo.putAllInLocalMonitoringRegion(replicaMap);
      }
    } catch (CancelException ex) {
      if (logger.isDebugEnabled()) {
        logger.debug("Management Task Cancelled");
      }
      return;
    } catch (GemFireException ex) {
      if (!cache.isClosed() && logger.isDebugEnabled()) {
        logger.debug(ex.getMessage(), ex);
      }
      // Ignore Exception if cache is closing
      return;
    } catch (VirtualMachineError e) {
      SystemFailure.initiateFailure(e);
      throw e;
    } catch (Throwable th) {
      SystemFailure.checkFailure();
      throw th;
    }
    if (logger.isTraceEnabled()) {
      logger.trace("Federation completed at managed node : ");
    }
  }
Internal testing hook.Not to be used from any where else. As soon as a mbean is created we can
push the data into local region which will make the data available at managing node site.
geode-core/src/main/java/org/apache/geode/management/internal/LocalManager.java