Package org.jivesoftware.util
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:
- Improve Admin Console's memory usage reporting
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
MemoryUsageMonitor.MemoryUsage
Memory usage statistics.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static MemoryUsageMonitor
getInstance()
MemoryUsageMonitor.MemoryUsage
getMemoryUsageAfterLastGC()
Returns the memory usage of Openfire as it was recorded directly after the last garbage collection event.
-
-
-
Method Detail
-
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.
-
-