@InterfaceAudience.Private @InterfaceStability.Evolving public class DirectMemoryUtils extends Object
| Constructor and Description |
|---|
DirectMemoryUtils() |
| Modifier and Type | Method and Description |
|---|---|
static void |
destroyDirectByteBuffer(ByteBuffer toBeDestroyed)
DirectByteBuffers are garbage collected by using a phantom reference and a
reference queue.
|
static long |
getDirectMemorySize() |
static long |
getDirectMemoryUsage() |
public static long getDirectMemorySize()
public static long getDirectMemoryUsage()
public static void destroyDirectByteBuffer(ByteBuffer toBeDestroyed) throws IllegalArgumentException, IllegalAccessException, InvocationTargetException, SecurityException, NoSuchMethodException
toBeDestroyed - The DirectByteBuffer that will be "cleaned". Utilizes reflection.IllegalArgumentExceptionIllegalAccessExceptionInvocationTargetExceptionSecurityExceptionNoSuchMethodExceptionCopyright © 2014 The Apache Software Foundation. All rights reserved.