@Override
        public Optional<String> isThresholdExceeded() {
            double heapUtilization = (runtime.maxMemory() - runtime.freeMemory()) / (double) runtime.maxMemory();
            if (heapUtilization > maxHeapUtilization) {
                return Optional.of(String.format("Max heap utilization exceeded: %f%%>%f%%", heapUtilization*100, maxHeapUtilization*100));
            }
            return Optional.empty();
        }
Note: implementation inspired by Jetty's {@link LowResourceMonitor}
container-core/src/main/java/com/yahoo/jdisc/http/server/jetty/ConnectionThrottler.java