synchronized void processLocalEvent(MemoryEvent event, String eventOrigin) {
    assert event.isLocal();

    if (logger.isDebugEnabled()) {
      logger.debug("Handling new local event " + event);
    }

    if (event.getState().isCritical() && !event.getPreviousState().isCritical()) {
      cache.getLogger().error(
          createCriticalThresholdLogMessage(event, eventOrigin, true));
      if (!cache.isQueryMonitorDisabledForLowMemory()) {
        cache.getQueryMonitor().setLowMemory(true, event.getBytesUsed());
      }

    } else if (!event.getState().isCritical() && event.getPreviousState().isCritical()) {
      cache.getLogger().error(
          createCriticalThresholdLogMessage(event, eventOrigin, false));
      if (!cache.isQueryMonitorDisabledForLowMemory()) {
        cache.getQueryMonitor().setLowMemory(false, event.getBytesUsed());
      }
    }

    if (event.getState().isEviction() && !event.getPreviousState().isEviction()) {
      cache.getLogger().info(String.format("Member: %s above %s eviction threshold",
          event.getMember(), "heap"));
    } else if (!event.getState().isEviction() && event.getPreviousState().isEviction()) {
      cache.getLogger().info(String.format("Member: %s below %s eviction threshold",
          event.getMember(), "heap"));
    }

    if (logger.isDebugEnabled()) {
      logger.debug("Informing remote members of event " + event);
    }

    resourceAdvisor.updateRemoteProfile();
    resourceManager.deliverLocalEvent(event);
  }
Deliver a memory event from one of the monitors to both local listeners and remote resource
managers. Also, if a critical event is received and a query monitor has been enabled, then the
query monitor will be notified.

Package private for testing.

@param event Event to process.
@param eventOrigin Indicates where the event originated e.g. notification vs polling
geode-core/src/main/java/org/apache/geode/internal/cache/control/HeapMemoryMonitor.java