summingbird
summingbird copied to clipboard
Async caches for triggers should probably use ManagementFactory.getMemoryMXBean
ManagementFactory.getMemoryMXBean() The downside of using runtime.freeMemory is that it will only decrease once a GC has gone through. So it will underestimate the actual free memory, possibly flushing more often that you want (which is probably fine). https://techblug.wordpress.com/2011/07/21/detecting-low-memory-in-java-part-2/ However, the notification is asynchronous