Package org.jvnet.hudson
Class MemoryMonitor
java.lang.Object
org.jvnet.hudson.MemoryMonitor
Encapsulates how to compute
MemoryUsage
.- Author:
- Kohsuke Kawaguchi
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic MemoryMonitor
get()
Obtains theMemoryMonitor
implementation suitable for the current platform.static void
Main for testabstract MemoryUsage
monitor()
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 theMemoryMonitor
implementation suitable for the current platform.- Throws:
IOException
- if no applicable implementation is found.
-
main
Main for test- Throws:
IOException
-