private void operateOnCache(InternalCache cache) {
    final boolean isDebugEnabled = logger.isDebugEnabled();

    for (DistributedRegion r : getDistributedRegions(cache)) {
      CacheDistributionAdvisor cda = r.getDistributionAdvisor();
      CacheDistributionAdvisor.CacheProfile cp =
          (CacheDistributionAdvisor.CacheProfile) cda.getProfile(getSender());
      if (cp != null) {
        if (isDebugEnabled) {
          logger.debug("Setting hasCacheServer flag on region \"{}\" for {}", r.getFullPath(),
              getSender());
        }
        cp.hasCacheServer = true;
      }
    }
    for (PartitionedRegion r : getPartitionedRegions(cache)) {
      CacheDistributionAdvisor cda = (CacheDistributionAdvisor) r.getDistributionAdvisor();
      CacheDistributionAdvisor.CacheProfile cp =
          (CacheDistributionAdvisor.CacheProfile) cda.getProfile(getSender());
      if (cp != null) {
        if (isDebugEnabled) {
          logger.debug("Setting hasCacheServer flag on region \"{}\" for {}", r.getFullPath(),
              getSender());
        }
        cp.hasCacheServer = true;
      }
    }
  }
OperationMessage synchronously propagates a change in the profile to another member. It is a
serial message so that there is no chance of out-of-order execution.
geode-core/src/main/java/org/apache/geode/internal/cache/AddCacheServerProfileMessage.java