public final class HeapMemory extends PerennialMemory
Heap memory represents the default allocation context for Java applications.
| Modifier and Type | Method and Description |
|---|---|
boolean |
executeInArea(java.util.function.BooleanSupplier logic)
Executes the
getAsBoolean() method from the logic
parameter using this memory area as the current allocation
context. |
double |
executeInArea(java.util.function.DoubleSupplier logic)
Executes the
getAsDouble() method from the logic parameter
using this memory area as the current allocation context. |
int |
executeInArea(java.util.function.IntSupplier logic)
Executes the
getAsInt() method from the logic parameter
using this memory area as the current allocation context. |
long |
executeInArea(java.util.function.LongSupplier logic)
Executes the
getAsLong() method from the logic parameter
using this memory area as the current allocation context. |
void |
executeInArea(java.lang.Runnable logic)
Executes the
run() method from the logic parameter
using this memory area as the current allocation context. |
<T> T |
executeInArea(java.util.function.Supplier<T> logic)
Executes the
get() method from the logic parameter
using this memory area as the current allocation context. |
static HeapMemory |
instance()
instance returns the single instance of HeapMemory in the
system.
|
long |
memoryConsumed()
memoryConsumed returns the number of bytes of memory of this
memory area that have been consumed.
|
long |
memoryRemaining()
memoryRemaining returns the number of available bytes left in
this memory area.
|
enter, enter, enter, enter, enter, enter, enter, getMemoryArea, mayHoldReferenceTo, mayHoldReferenceTo, newArray, newArrayInArea, newInstance, newInstance, sizepublic static HeapMemory instance()
public long memoryRemaining()
memoryRemaining in class MemoryAreapublic long memoryConsumed()
memoryConsumed in class MemoryAreapublic void executeInArea(java.lang.Runnable logic)
MemoryArearun() method from the logic parameter
using this memory area as the current allocation context. The
effect of executeInArea on the scope stack is specified in
the subclasses of MemoryArea.executeInArea in class MemoryArealogic - The logic whose run() method is to be executed.public boolean executeInArea(java.util.function.BooleanSupplier logic)
MemoryAreagetAsBoolean() method from the logic
parameter using this memory area as the current allocation
context. The effect of executeInArea on the scope stack is
specified in the subclasses of MemoryArea.executeInArea in class MemoryArealogic - The logic whose getAsBoolean() method is to be
executed.getAsBoolean() method.public double executeInArea(java.util.function.DoubleSupplier logic)
MemoryAreagetAsDouble() method from the logic parameter
using this memory area as the current allocation context. The
effect of executeInArea on the scope stack is specified in
the subclasses of MemoryArea.executeInArea in class MemoryArealogic - The logic whose getAsDouble() method is to be
executed.getAsDouble() method.public int executeInArea(java.util.function.IntSupplier logic)
MemoryAreagetAsInt() method from the logic parameter
using this memory area as the current allocation context. The
effect of executeInArea on the scope stack is specified in
the subclasses of MemoryArea.executeInArea in class MemoryArealogic - The logic whose getAsInt() method is to be executed.getAsInt() method.public long executeInArea(java.util.function.LongSupplier logic)
MemoryAreagetAsLong() method from the logic parameter
using this memory area as the current allocation context. The
effect of executeInArea on the scope stack is specified in
the subclasses of MemoryArea.executeInArea in class MemoryArealogic - The logic whose getAsLong() method is to be executed.getAsLong() method.public <T> T executeInArea(java.util.function.Supplier<T> logic)
MemoryAreaget() method from the logic parameter
using this memory area as the current allocation context. The
effect of executeInArea on the scope stack is specified in
the subclasses of MemoryArea.executeInArea in class MemoryArealogic - The logic whose get() method is to be executed.get() method.aicas GmbH, Karlsruhe, Germany —www.aicas.com
Copyright © 2001-2024 aicas GmbH. All Rights Reserved.