Package io.netty.util.internal
Class CleanerJava9.CleanableDirectBufferImpl
- java.lang.Object
-
- io.netty.util.internal.CleanerJava9.CleanableDirectBufferImpl
-
- All Implemented Interfaces:
CleanableDirectBuffer
- Enclosing class:
- CleanerJava9
private static final class CleanerJava9.CleanableDirectBufferImpl extends java.lang.Object implements CleanableDirectBuffer
-
-
Field Summary
Fields Modifier and Type Field Description private java.nio.ByteBufferbuffer
-
Constructor Summary
Constructors Modifier Constructor Description privateCleanableDirectBufferImpl(java.nio.ByteBuffer buffer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.nio.ByteBufferbuffer()Get the buffer instance.voidclean()Deallocate the buffer.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.netty.util.internal.CleanableDirectBuffer
hasMemoryAddress, memoryAddress
-
-
-
-
Method Detail
-
buffer
public java.nio.ByteBuffer buffer()
Description copied from interface:CleanableDirectBufferGet the buffer instance.Note: the buffer must not be accessed after the
CleanableDirectBuffer.clean()method has been called.- Specified by:
bufferin interfaceCleanableDirectBuffer- Returns:
- The
ByteBufferinstance.
-
clean
public void clean()
Description copied from interface:CleanableDirectBufferDeallocate the buffer. This method can only be called once per instance, and all usages of the buffer must have ceased before this method is called, and the buffer must not be accessed again after this method has been called.- Specified by:
cleanin interfaceCleanableDirectBuffer
-
-