public class DeallocationHelper extends Object
Modifier and Type | Class and Description |
---|---|
static class |
DeallocationHelper.AndroidDeallocator |
static class |
DeallocationHelper.ApacheHarmonyDeallocator |
static class |
DeallocationHelper.Deallocator
tool responsible for releasing the native memory of a deallocatable byte
buffer
|
static class |
DeallocationHelper.GnuClasspathDeallocator |
static class |
DeallocationHelper.OracleSunOpenJdkDeallocator |
Constructor and Description |
---|
DeallocationHelper()
Default constructor
|
DeallocationHelper(boolean ignoreClassesAndFieldsHints)
Main constructor
|
Modifier and Type | Method and Description |
---|---|
void |
deallocate(Buffer buffer) |
ByteBuffer |
findDeallocatableBuffer(Buffer buffer) |
Map<Class<?>,Field> |
getAttachmentOrByteBufferFieldMap() |
Set<Class<?>> |
getDeallocatableBufferClassSet() |
DeallocationHelper.Deallocator |
getDeallocator() |
void |
setAttachmentOrByteBufferFieldMap(Map<Class<?>,Field> attachmentOrByteBufferFieldMap) |
void |
setDeallocatableBufferClassSet(Set<Class<?>> deallocatableBufferClassSet) |
void |
setDeallocator(DeallocationHelper.Deallocator deallocator) |
public DeallocationHelper()
public DeallocationHelper(boolean ignoreClassesAndFieldsHints)
ignoreClassesAndFieldsHints
- true
if the known implementation details should
be ignored when looking for the classes and the fields used
for the native memory of the direct buffers (they are then
fully recomputed at runtime which is slower but safer),
otherwise false
public ByteBuffer findDeallocatableBuffer(Buffer buffer)
public void deallocate(Buffer buffer)
public DeallocationHelper.Deallocator getDeallocator()
public void setDeallocator(DeallocationHelper.Deallocator deallocator)
public void setAttachmentOrByteBufferFieldMap(Map<Class<?>,Field> attachmentOrByteBufferFieldMap)