public boolean addMonitor(StatisticsMonitor monitor) {
    synchronized (this) {
      boolean added = false;
      if (!monitors.contains(monitor)) {
        added = monitors.add(monitor);
      }
      if (!monitors.isEmpty()) {
        startNotifier_IfEnabledAndNotRunning();
      }
      return added;
    }
  }
Adds a monitor which will be notified of samples
geode-core/src/main/java/org/apache/geode/internal/statistics/StatMonitorHandler.java