public static class BufferedIO.MemoryManagement extends Object implements IMemoryManageable
IMemoryManageable.FreeMemoryLevel| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_MAX_MEMORY
By default set to 96 MB.
|
static int |
DEFAULT_MEMORY_THRESHOLD
By default set to 72 MB.
|
static int |
DEFAULT_TO_BE_WRITTEN_THRESHOLD
By default set to 12 MB.
|
| Modifier and Type | Method and Description |
|---|---|
void |
freeMemory(IMemoryManageable.FreeMemoryLevel level)
Request to free some memory.
|
String |
getDescription()
Desciption.
|
List<String> |
getItemsDescription()
Describe each item that can be freed.
|
static long |
getMaxMemory() |
static long |
getMemoryThreshold() |
static long |
getToBeWrittenThreshold() |
static void |
setMemoryLimits(long memoryThreshold,
long maxMemory,
long toBeWrittenThreshold)
Set the memory limits.
|
public static final int DEFAULT_MEMORY_THRESHOLD
public static final int DEFAULT_MAX_MEMORY
public static final int DEFAULT_TO_BE_WRITTEN_THRESHOLD
public static long getMemoryThreshold()
public static long getMaxMemory()
public static long getToBeWrittenThreshold()
public static void setMemoryLimits(long memoryThreshold,
long maxMemory,
long toBeWrittenThreshold)
memoryThreshold - when this threshold is reached, it accelerates freeing some memorymaxMemory - maximum memory to usetoBeWrittenThreshold - when this threshold is reached, pending writes are executedpublic String getDescription()
IMemoryManageablegetDescription in interface IMemoryManageablepublic List<String> getItemsDescription()
IMemoryManageablegetItemsDescription in interface IMemoryManageablepublic void freeMemory(IMemoryManageable.FreeMemoryLevel level)
IMemoryManageablefreeMemory in interface IMemoryManageableCopyright © 2019. All rights reserved.