public class MemoryManager extends Object
IMemoryManageable instances.
It also monitor memory usage and garbage collection to free additional memory when needed.| Modifier and Type | Method and Description |
|---|---|
static void |
freeMemory(IMemoryManageable.FreeMemoryLevel level)
Free memory on memory manageable instances.
|
static void |
init()
Initialization.
|
static void |
logManageableContent()
Log description of memory manageable instances.
|
static void |
logMemory(Logger.Level level)
Log memory usage.
|
static void |
logMemory(long interval,
Logger.Level level)
Log memory usage to the console at regular interval.
|
static void |
logMemory(StringBuilder s)
Log memory status into the given StringBuilder.
|
static void |
register(IMemoryManageable manageable)
Register a memory manageable instance.
|
static void |
unregister(IMemoryManageable manageable)
Unregister a memory manageable instance.
|
public static void init()
public static void register(IMemoryManageable manageable)
public static void unregister(IMemoryManageable manageable)
public static void logMemory(long interval,
Logger.Level level)
public static void logManageableContent()
public static void logMemory(Logger.Level level)
public static void logMemory(StringBuilder s)
public static void freeMemory(IMemoryManageable.FreeMemoryLevel level)
Copyright © 2019. All rights reserved.