@Override
    @SuppressWarnings("synthetic-access")
    public void statValueChanged(double value) {
      final long usedBytes = (long) value;
      try {
        resourceManager.runWithNotifyExecutor(() -> {
          if (!testDisableMemoryUpdates) {
            updateStateAndSendEvent(usedBytes, "polling");
          }
        });
        if (HeapMemoryMonitor.logger.isDebugEnabled()) {
          HeapMemoryMonitor.logger.debug(
              "StatSampler scheduled a " + "handleNotification call with " + usedBytes + " bytes");
        }
      } catch (RejectedExecutionException ignore) {
        if (!resourceManager.isClosed()) {
          logger.warn("No memory events will be delivered because of RejectedExecutionException");
        }
      } catch (CacheClosedException ignore) {
        // nothing to do
      }
    }
Determines if the given member is in a heap critical state.

@param member Member to check.

@return True if the member's heap memory is in a critical state, false otherwise.
geode-core/src/main/java/org/apache/geode/internal/cache/control/HeapMemoryMonitor.java