Class MemoryUsageMonitor

java.lang.Object
org.jivesoftware.util.MemoryUsageMonitor

public class MemoryUsageMonitor extends Object
Records meory usage (based on the 'heap') of Openfire. This monitor, which is intended to be used as a singleton, records the heap-based memory usage directly after each garbage collection event. It is intended to be used to inform end-users about the current memory consumption of Openfire, excluding any memory that is taken up by instances that are eligble for garbage collection.
Author:
Guus der Kinderen, guus.der.kinderen@gmail.com
See Also:
  • Method Details

    • getInstance

      @Nonnull public static MemoryUsageMonitor getInstance()
    • getMemoryUsageAfterLastGC

      @Nonnull public MemoryUsageMonitor.MemoryUsage getMemoryUsageAfterLastGC()
      Returns the memory usage of Openfire as it was recorded directly after the last garbage collection event. When garbage collection has not yet occurred (eg: shortly after startup), the current memory usage will be returned.
      Returns:
      Memory usage statistics.