@Override
    public void process(DistributionMessage msg) {
      try {
        if (msg instanceof IdentityReplyMessage) {
          IdentityReplyMessage reply = (IdentityReplyMessage) msg;
          final Integer remoteId = reply.getId();
          synchronized (this) {
            if (remoteId != null) {
              if (returnValue == null) {
                returnValue = remoteId;
              } else {
                if (remoteId > returnValue) {
                  returnValue = remoteId;
                }
              }
            }
          }
          if (logger.isTraceEnabled(LogMarker.DM_VERBOSE)) {
            logger.trace(LogMarker.DM_VERBOSE, "{} return value is {}", getClass().getName(),
                returnValue);
          }
        }
      } finally {
        super.process(msg);
      }
    }
The response to a {@link IdentityRequestMessage} use {@link #waitForId()} to capture the
identity

@since GemFire 5.0
geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/IdentityRequestMessage.java