public int addListener(InternalDistributedMember recipient, long resourceId, String statName) {
    int result = getNextListenerId();
    synchronized (listeners) {
      while (listeners.get(result) != null) {
        // previous one was still being used
        result = getNextListenerId();
      }
      RemoteStatListenerImpl remoteStatListener =
          RemoteStatListenerImpl.create(result, recipient, resourceId, statName, this);
      listeners.put(result, remoteStatListener);
      List<RemoteStatListenerImpl> remoteStatListenerList =
          recipientToListeners.computeIfAbsent(recipient, k -> new ArrayList<>());
      remoteStatListenerList.add(remoteStatListener);
    }
    return result;
  }
Returns the <code>ProcessStats</code> for this Java VM. Note that <code>null</code> will be
returned if operating statistics are disabled.

@since GemFire 3.5
geode-core/src/main/java/org/apache/geode/internal/statistics/GemFireStatSampler.java