Class ProxyMemoryGuard


  • public class ProxyMemoryGuard
    extends Object
    Logic around OoM protection logic that drains memory buffers on MEMORY_THRESHOLD_EXCEEDED notifications, extracted from AbstractAgent.
    Author:
    [email protected]
    • Constructor Detail

      • ProxyMemoryGuard

        public ProxyMemoryGuard​(@Nonnull
                                Runnable flushTask,
                                double threshold)
        Set up the memory guard.
        Parameters:
        flushTask - runnable to invoke when in-memory buffers need to be drained to disk
        threshold - memory usage threshold that is considered critical, 0 < threshold <= 1.