Class CollectorMemoryTracker

  • All Implemented Interfaces:
    MemoryTracker

    public class CollectorMemoryTracker
    extends java.lang.Object
    implements MemoryTracker
    Default implementation of MemoryTracker that tracks allocations and allows setting a memory limit per collector
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private long memoryLimit  
      private java.util.concurrent.atomic.AtomicLong memoryUsage  
      private java.lang.String name  
    • Constructor Summary

      Constructors 
      Constructor Description
      CollectorMemoryTracker​(java.lang.String name, long memoryLimit)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      long getBytes()  
      void updateBytes​(long bytes)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • name

        private java.lang.String name
      • memoryUsage

        private java.util.concurrent.atomic.AtomicLong memoryUsage
      • memoryLimit

        private final long memoryLimit
    • Constructor Detail

      • CollectorMemoryTracker

        public CollectorMemoryTracker​(java.lang.String name,
                                      long memoryLimit)