Package org.jvnet.hudson
Class MemoryMonitor
- java.lang.Object
-
- org.jvnet.hudson.MemoryMonitor
-
public abstract class MemoryMonitor extends Object
Encapsulates how to computeMemoryUsage
.- Author:
- Kohsuke Kawaguchi
-
-
Constructor Summary
Constructors Constructor Description MemoryMonitor()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static MemoryMonitor
get()
Obtains theMemoryMonitor
implementation suitable for the current platform.static void
main(String[] args)
Main for testabstract MemoryUsage
monitor()
Obtains the memory usage statistics.
-
-
-
Method Detail
-
monitor
public abstract MemoryUsage monitor() throws IOException
Obtains the memory usage statistics.- Returns:
- always non-null object.
- Throws:
IOException
- If the computation fails for some reason.
-
get
public static MemoryMonitor get() throws IOException
Obtains theMemoryMonitor
implementation suitable for the current platform.- Throws:
IOException
- if no applicable implementation is found.
-
main
public static void main(String[] args) throws IOException
Main for test- Throws:
IOException
-
-