Class MemoryAllocationExports.AllocationCountingNotificationListener

  • All Implemented Interfaces:
    java.util.EventListener, javax.management.NotificationListener
    Enclosing class:
    MemoryAllocationExports

    static class MemoryAllocationExports.AllocationCountingNotificationListener
    extends java.lang.Object
    implements javax.management.NotificationListener
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private Counter counter  
      private java.util.Map<java.lang.String,​java.lang.Long> lastMemoryUsage  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      private static long getAndSet​(java.util.Map<java.lang.String,​java.lang.Long> map, java.lang.String key, long value)  
      (package private) void handleMemoryPool​(java.lang.String memoryPool, long before, long after)  
      void handleNotification​(javax.management.Notification notification, java.lang.Object handback)  
      • Methods inherited from class java.lang.Object

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

      • lastMemoryUsage

        private final java.util.Map<java.lang.String,​java.lang.Long> lastMemoryUsage
      • counter

        private final Counter counter
    • Constructor Detail

      • AllocationCountingNotificationListener

        AllocationCountingNotificationListener​(Counter counter)
    • Method Detail

      • handleNotification

        public void handleNotification​(javax.management.Notification notification,
                                       java.lang.Object handback)
        Specified by:
        handleNotification in interface javax.management.NotificationListener
      • handleMemoryPool

        void handleMemoryPool​(java.lang.String memoryPool,
                              long before,
                              long after)
      • getAndSet

        private static long getAndSet​(java.util.Map<java.lang.String,​java.lang.Long> map,
                                      java.lang.String key,
                                      long value)