Class GarbageCollectionMonitor
- java.lang.Object
-
- com.sedmelluq.discord.lavaplayer.tools.GarbageCollectionMonitor
-
- All Implemented Interfaces:
java.lang.Runnable,java.util.EventListener,javax.management.NotificationListener
public class GarbageCollectionMonitor extends java.lang.Object implements javax.management.NotificationListener, java.lang.RunnableGarbage collection monitor which records all GC pause lengths and logs them. In case the GC pause statistics are considered bad for latency, the statistics are logged at a warning level.
-
-
Constructor Summary
Constructors Constructor Description GarbageCollectionMonitor(java.util.concurrent.ScheduledExecutorService reportingExecutor)Create an instance of GC monitor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddisable()Disable GC monitoring and reporting.voidenable()Enable GC monitoring and reporting.voidhandleNotification(javax.management.Notification notification, java.lang.Object handback)voidrun()
-
-
-
Method Detail
-
enable
public void enable()
Enable GC monitoring and reporting.
-
disable
public void disable()
Disable GC monitoring and reporting.
-
handleNotification
public void handleNotification(javax.management.Notification notification, java.lang.Object handback)- Specified by:
handleNotificationin interfacejavax.management.NotificationListener
-
run
public void run()
- Specified by:
runin interfacejava.lang.Runnable
-
-