public String getMemberId() {
    final InternalDistributedSystem distributedSystem =
        InternalDistributedSystem.getConnectedInstance();
    return distributedSystem != null ? distributedSystem.getMemberId() : null;
  }
Gets the ID of the member in the GemFire distributed system as determined and assigned by
GemFire when the member process joins the distributed system. Note, this call only works if the
API is used in-process.

@return a String value indicating the ID of the member in the GemFire distributed system.
geode-core/src/main/java/org/apache/geode/distributed/AbstractLauncher.java