public QueueStatHelper getResourceEventQueueStatHelper() {
    return new QueueStatHelper() {
      @Override
      public void add() {
        incResourceEventQueueSize(1L);
      }

      @Override
      public void remove() {
        incResourceEventQueueSize(-1L);
      }

      @Override
      public void remove(long count) {
        incResourceEventQueueSize(-1 * count);
      }
    };
  }
@return a {@link QueueStatHelper} so that we can record number of events in the
        thresholdEventProcessor queue.
geode-core/src/main/java/org/apache/geode/internal/cache/control/ResourceManagerStats.java