Package io.prometheus.client.hotspot
Class MemoryAllocationExports.AllocationCountingNotificationListener
- java.lang.Object
-
- io.prometheus.client.hotspot.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
-
Constructor Summary
Constructors Constructor Description AllocationCountingNotificationListener(Counter counter)
-
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)
-
-
-
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 interfacejavax.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)
-
-