Package akka.io
Class DirectByteBufferPool$
- java.lang.Object
-
- akka.io.DirectByteBufferPool$
-
public class DirectByteBufferPool$ extends java.lang.Object
INTERNAL API
-
-
Field Summary
Fields Modifier and Type Field Description static DirectByteBufferPool$
MODULE$
Static reference to the singleton instance of this Scala object.
-
Constructor Summary
Constructors Constructor Description DirectByteBufferPool$()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
tryCleanDirectByteBuffer(java.nio.ByteBuffer byteBuffer)
DirectByteBuffers are garbage collected by using a phantom reference and a reference queue.
-
-
-
Field Detail
-
MODULE$
public static final DirectByteBufferPool$ MODULE$
Static reference to the singleton instance of this Scala object.
-
-
Method Detail
-
tryCleanDirectByteBuffer
public void tryCleanDirectByteBuffer(java.nio.ByteBuffer byteBuffer)
DirectByteBuffers are garbage collected by using a phantom reference and a reference queue. Every once a while, the JVM checks the reference queue and cleans the DirectByteBuffers. However, as this doesn't happen immediately after discarding all references to a DirectByteBuffer, it's easy to OutOfMemoryError yourself using DirectByteBuffers. This function explicitly calls the Cleaner method of a DirectByteBuffer.Utilizes reflection to avoid dependency to
sun.misc.Cleaner
.
-
-