public abstract class PinnedAllocator extends Object implements AutoCloseable
| Modifier and Type | Class and Description |
|---|---|
static class |
PinnedAllocator.PinnedAllocationLifecycleError
Signals that allocation has failed because of a lifecycle error, i.e., rather than an
out-of-memory error.
|
| Constructor and Description |
|---|
PinnedAllocator() |
| Modifier and Type | Method and Description |
|---|---|
abstract void |
close()
Close this PinnedAllocator to further allocation.
|
Object |
newArray(Class<?> componentType,
int length)
Allocate an array with the given element type.
|
<T> T |
newInstance(Class<T> instanceClass)
Allocate an Object of the given class.
|
abstract PinnedAllocator |
open()
A PinnedAllocator can not allocate objects until opened.
|
abstract void |
release()
Release the Objects allocated by this PinnedAllocator.
|
public abstract PinnedAllocator open()
public final <T> T newInstance(Class<T> instanceClass)
Unsafe.allocateInstance(Class).public final Object newArray(Class<?> componentType, int length)
Array.newInstance(Class, int);public abstract void close()
close in interface AutoCloseablepublic abstract void release()