Package org.jvnet.hudson
Class MemoryMonitor
java.lang.Object
org.jvnet.hudson.MemoryMonitor
Encapsulates how to compute
MemoryUsage.- Author:
- Kohsuke Kawaguchi
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic MemoryMonitorget()Obtains theMemoryMonitorimplementation suitable for the current platform.static voidMain for testabstract MemoryUsagemonitor()Obtains the memory usage statistics.
-
Constructor Details
-
MemoryMonitor
public MemoryMonitor()
-
-
Method Details
-
monitor
Obtains the memory usage statistics.- Returns:
- always non-null object.
- Throws:
IOException- If the computation fails for some reason.
-
get
Obtains theMemoryMonitorimplementation suitable for the current platform.- Throws:
IOException- if no applicable implementation is found.
-
main
Main for test- Throws:
IOException
-