Class OMemory
java.lang.Object
com.orientechnologies.common.util.OMemory
Provides various utilities related to memory management and configuration.
- Author:
- Sergey Sitnikov
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidChecks the OrientDB cache memory configuration and emits a warning if configuration is invalid.static voidTries to fix some common cache/memory configuration problems: Cache size is larger than direct memory size.static longgetCappedRuntimeMaxMemory(long unlimitedCap)
-
Method Details
-
getCappedRuntimeMaxMemory
public static long getCappedRuntimeMaxMemory(long unlimitedCap) - Parameters:
unlimitedCap- the upper limit on reported memory, if JVM reports unlimited memory.- Returns:
- same as
Runtime.maxMemory()except thatunlimitedCaplimit is applied if JVM reportsunlimited memory.
-
checkCacheMemoryConfiguration
public static void checkCacheMemoryConfiguration()Checks the OrientDB cache memory configuration and emits a warning if configuration is invalid. -
fixCommonConfigurationProblems
public static void fixCommonConfigurationProblems()Tries to fix some common cache/memory configuration problems:- Cache size is larger than direct memory size.
- Memory chunk size is larger than cache size.
-