Package one.microstream.memory
Interface MemoryStatistics
- All Known Implementing Classes:
MemoryStatistics.Default
public interface MemoryStatistics
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
MemoryStatistics.Default
-
Method Summary
Modifier and Type Method Description long
committed()
Returns the amount of memory in bytes that is committed for the Java virtual machine to use.long
max()
Returns the maximum amount of memory in bytes that can be used for memory management.static MemoryStatistics
New(long max, long committed, long used)
long
used()
Returns the amount of used memory in bytes.
-
Method Details
-
max
long max()Returns the maximum amount of memory in bytes that can be used for memory management. This method returns-1
if the maximum memory size is undefined.This amount of memory is not guaranteed to be available for memory management if it is greater than the amount of committed memory. The Java virtual machine may fail to allocate memory even if the amount of used memory does not exceed this maximum size.
- Returns:
- the maximum amount of memory in bytes;
-1
if undefined.
-
committed
long committed()Returns the amount of memory in bytes that is committed for the Java virtual machine to use. This amount of memory is guaranteed for the Java virtual machine to use.- Returns:
- the amount of committed memory in bytes.
-
used
long used()Returns the amount of used memory in bytes.- Returns:
- the amount of used memory in bytes.
-
New
-