|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sleepycat.je.dbi.MemoryBudget
MemoryBudget calculates the available memory for JE and how to apportion it between cache and log buffers. It is meant to centralize all memory calculations. Objects that ask for memory budgets should get settings from this class, rather than using the configuration parameter values directly.
Field Summary | |
static int |
ARRAY_ITEM_OVERHEAD
|
static int |
BIN_FIXED_OVERHEAD
|
static int |
BYTE_ARRAY_OVERHEAD
|
static int |
CHECKPOINT_REFERENCE_SIZE
|
static int |
DBIN_FIXED_OVERHEAD
|
static int |
DIN_FIXED_OVERHEAD
|
static int |
HASHMAP_ENTRY_OVERHEAD
|
static int |
HASHMAP_OVERHEAD
|
static int |
HASHSET_ENTRY_OVERHEAD
|
static int |
HASHSET_OVERHEAD
|
static int |
IN_FIXED_OVERHEAD
|
static int |
KEY_OVERHEAD
|
static int |
LN_OVERHEAD
|
static int |
LOCK_OVERHEAD
|
static int |
LOCKINFO_OVERHEAD
|
static int |
LONG_OVERHEAD
|
static int |
LSN_SIZE
|
static int |
OBJECT_OVERHEAD
|
static int |
TWOHASHMAPS_OVERHEAD
|
static int |
TXN_OVERHEAD
|
Constructor Summary | |
(package private) |
MemoryBudget(EnvironmentImpl envImpl,
DbConfigManager configManager)
|
Method Summary | |
long |
accumulateNewUsage(IN in,
long newSize)
|
void |
envConfigUpdate(DbConfigManager configManager)
Respond to config updates. |
long |
getBINOverhead()
|
long |
getCacheMemoryUsage()
|
long |
getDBINOverhead()
|
long |
getDINOverhead()
|
long |
getINOverhead()
|
long |
getLogBufferBudget()
|
long |
getMaxMemory()
|
static long |
getRuntimeMaxMemory()
Returns Runtime.maxMemory(), accounting for a MacOS bug. |
long |
getTreeBudget()
|
(package private) void |
initCacheMemoryUsage()
Initialize the starting environment memory state |
(package private) void |
loadStats(StatsConfig config,
EnvironmentStats stats)
|
void |
refreshCacheMemoryUsage(long newSize)
|
void |
updateCacheMemoryUsage(long increment)
Update the environment wide count, wake up the evictor if necessary. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int LONG_OVERHEAD
public static final int BYTE_ARRAY_OVERHEAD
public static final int OBJECT_OVERHEAD
public static final int ARRAY_ITEM_OVERHEAD
public static final int HASHMAP_OVERHEAD
public static final int HASHMAP_ENTRY_OVERHEAD
public static final int HASHSET_OVERHEAD
public static final int HASHSET_ENTRY_OVERHEAD
public static final int TWOHASHMAPS_OVERHEAD
public static final int LN_OVERHEAD
public static final int BIN_FIXED_OVERHEAD
public static final int DIN_FIXED_OVERHEAD
public static final int DBIN_FIXED_OVERHEAD
public static final int IN_FIXED_OVERHEAD
public static final int KEY_OVERHEAD
public static final int LSN_SIZE
public static final int LOCK_OVERHEAD
public static final int LOCKINFO_OVERHEAD
public static final int TXN_OVERHEAD
public static final int CHECKPOINT_REFERENCE_SIZE
Constructor Detail |
MemoryBudget(EnvironmentImpl envImpl, DbConfigManager configManager) throws DatabaseException
Method Detail |
public void envConfigUpdate(DbConfigManager configManager) throws DatabaseException
envConfigUpdate
in interface EnvConfigObserver
DatabaseException
public static long getRuntimeMaxMemory()
void initCacheMemoryUsage() throws DatabaseException
DatabaseException
public void updateCacheMemoryUsage(long increment)
increment
- note that increment may be negative.public long accumulateNewUsage(IN in, long newSize)
public void refreshCacheMemoryUsage(long newSize)
public long getCacheMemoryUsage()
public long getLogBufferBudget()
public long getMaxMemory()
public long getTreeBudget()
public long getINOverhead()
public long getBINOverhead()
public long getDINOverhead()
public long getDBINOverhead()
void loadStats(StatsConfig config, EnvironmentStats stats)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |