private void setNetworkHopType(final Integer bucketId,
      final InternalDistributedMember targetNode) {

    if (isDataStore() && !getMyId().equals(targetNode)) {
      Set<ServerBucketProfile> profiles = getRegionAdvisor().getClientBucketProfiles(bucketId);

      if (profiles != null) {
        for (ServerBucketProfile profile : profiles) {
          if (profile.getDistributedMember().equals(targetNode)) {

            if (isProfileFromSameGroup(profile)) {
              if (getNetworkHopType() != NETWORK_HOP_TO_SAME_GROUP
                  && logger.isDebugEnabled()) {
                logger.debug(
                    "one-hop: cache op meta data staleness observed.  Message is in same server group (byte 1)");
              }
              setNetworkHopType((byte) NETWORK_HOP_TO_SAME_GROUP);
            } else {
              if (getNetworkHopType() != NETWORK_HOP_TO_DIFFERENT_GROUP
                  && logger.isDebugEnabled()) {
                logger.debug(
                    "one-hop: cache op meta data staleness observed.  Message is to different server group (byte 2)");
              }
              setNetworkHopType((byte) NETWORK_HOP_TO_DIFFERENT_GROUP);
            }
            setMetadataVersion((byte) profile.getVersion());
            break;
          }
        }
      }
    }
  }
@param expectedOldValue only succeed if current value is equal to expectedOldValue
@throws EntryNotFoundException if entry not found or if expectedOldValue not null and current
        value was not equal to expectedOldValue
geode-core/src/main/java/org/apache/geode/internal/cache/PartitionedRegion.java