Package com.complexible.common.memory
Interface MemoryConfiguration
public interface MemoryConfiguration
Class for configuring memory used by different components. This is a temporary solution until a better solution is found. We enumerate all the
components that use significant amount of memory. Some memory is reserved for the other components that use relatively less memory and they are not
accounted here.
- Since:
- 5.0
- Version:
- 5.0
- Author:
- Evren
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enumstatic enumstatic enum -
Method Summary
Modifier and TypeMethodDescriptionlonggetMemory(MemoryConfiguration.HeapComponent component) Returns the maximum amount of heap memory in bytes that can be for the given component.longgetMemory(MemoryConfiguration.NativeComponent component) Get the maximum amount of native (direct) memory in bytes that can be used for the given component.
-
Method Details
-
getMemory
Get the maximum amount of native (direct) memory in bytes that can be used for the given component.- Parameters:
component- a component that uses native memory- Returns:
- the maximum amount of native memory
-
getMemory
Returns the maximum amount of heap memory in bytes that can be for the given component.- Parameters:
component- a component that uses heap memory- Returns:
- the maximum amount of heap memory in bytes that can be for the given component.
-