@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.IllegalArgumentException
IllegalAccessException
InvocationTargetException
SecurityException
NoSuchMethodException
Copyright © 2007–2019 Cloudera. All rights reserved.