@Override
  public boolean updateData() {
    try {
      if (conn == null) {
        return false;
      }

      // deleted Members
      cluster.getDeletedMembers().clear();
      for (Entry<String, Cluster.Member> memberSet : cluster.getMembersHMap().entrySet()) {
        cluster.getDeletedMembers().add(memberSet.getKey());
      }

      // Deleted Regions
      cluster.getDeletedRegions().clear();
      for (Cluster.Region region : cluster.getClusterRegions().values()) {
        cluster.getDeletedRegions().add(region.getFullPath());
      }

      systemMBeans = mbs.queryNames(MBEAN_OBJECT_NAME_SYSTEM_DISTRIBUTED, null);
      for (ObjectName sysMBean : systemMBeans) {
        updateClusterSystem(sysMBean);
      }

      // Cluster Regions/Tables
      Set<ObjectName> regionMBeans =
          mbs.queryNames(MBEAN_OBJECT_NAME_REGION_DISTRIBUTED, null);

      // For Gemfire
      for (ObjectName regMBean : regionMBeans) {
        updateClusterRegion(regMBean);
      }

      // Remove deleted regions from cluster's regions list
      for (String s : cluster.getDeletedRegions()) {
        cluster.removeClusterRegion(s);
      }

      List<ObjectName> serviceMBeans = new ArrayList<>();
      List<ObjectName> nonServiceMBeans = new ArrayList<>();

      Set<ObjectName> memberMBeans = mbs.queryNames(MBEAN_OBJECT_NAME_MEMBER, null);
      for (ObjectName mBean : memberMBeans) {
        String service = mBean.getKeyProperty(PulseConstants.MBEAN_KEY_PROPERTY_SERVICE);
        if (service == null) {
          nonServiceMBeans.add(mBean);
        } else {
          serviceMBeans.add(mBean);
        }
      }

      // Make sure that we process 'pure' members first. This ensures that various structures in
      // Cluster are set up correctly since they are keyed on the 'host' attribute which does not
      // necessarily appear in other MBeans. This avoids the possibility of having a 'null' host
      // icon appear in the Pulse UI.
      for (ObjectName mBean : nonServiceMBeans) {
        updateClusterMember(mBean);
      }

      for (ObjectName serviceMBean : serviceMBeans) {
        String service = serviceMBean.getKeyProperty(PulseConstants.MBEAN_KEY_PROPERTY_SERVICE);
        switch (service) {
          case PulseConstants.MBEAN_KEY_PROPERTY_SERVICE_VALUE_REGION:
            updateMemberRegion(serviceMBean);
            break;
          case PulseConstants.MBEAN_KEY_PROPERTY_SERVICE_VALUE_CACHESERVER:
            updateMemberClient(serviceMBean);
            break;
          case PulseConstants.MBEAN_KEY_PROPERTY_SERVICE_VALUE_GATEWAYRECEIVER:
            updateGatewayReceiver(serviceMBean);
            break;
          case PulseConstants.MBEAN_KEY_PROPERTY_SERVICE_VALUE_GATEWAYSENDER:
            updateGatewaySender(serviceMBean);
            break;
          case PulseConstants.MBEAN_KEY_PROPERTY_SERVICE_VALUE_ASYNCEVENTQUEUE:
            updateAsyncEventQueue(serviceMBean);
            break;
          case PulseConstants.MBEAN_KEY_PROPERTY_SERVICE_VALUE_LOCATOR:
            updateClusterMember(serviceMBean);
            break;
        }
      }

      // Cluster Query Statistics
      Set<ObjectName> statementObjectNames =
          mbs.queryNames(MBEAN_OBJECT_NAME_STATEMENT_DISTRIBUTED, null);
      for (ObjectName stmtObjectName : statementObjectNames) {
        updateClusterStatement(stmtObjectName);
      }
    } catch (IOException ioe) {
      logger.fatal(ioe.getMessage(), ioe);
      mbs = null;
      if (conn != null) {
        try {
          conn.close();
        } catch (IOException e1) {
          logger.fatal(e1.getMessage(), e1);
        }
        conn = null;
        cluster.setConnectedFlag(false);
        cluster.setConnectionErrorMsg(ioe.getMessage());
      }

      return false;
    }

    // If there were members deleted, remove them from the membersList &
    // physicalToMember.
    for (String memberKey : cluster.getDeletedMembers()) {
      if (cluster.getMembersHMap().containsKey(memberKey)) {
        Cluster.Member member = cluster.getMembersHMap().get(memberKey);
        List<Cluster.Member> memberArrList = cluster.getPhysicalToMember().get(member.getHost());
        if (memberArrList != null) {
          if (memberArrList.contains(member)) {
            String host = member.getHost();
            cluster.getPhysicalToMember().get(member.getHost()).remove(member);

            if (cluster.getPhysicalToMember().get(member.getHost()).size() == 0) {
              cluster.getPhysicalToMember().remove(host);
            }
          }
        }
        cluster.getMembersHMap().remove(memberKey);
      }

    }

    return true;
  }
function used for updating Cluster Data.
geode-pulse/src/main/java/org/apache/geode/tools/pulse/internal/data/JMXDataUpdater.java