Package io.netty.util.internal
Interface CleanableDirectBuffer
-
public interface CleanableDirectBuffer
Encapsulates a directByteBuffer
and its mechanism for immediate deallocation, if any.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ByteBuffer
buffer()
Get the buffer instance.void
clean()
Deallocate the buffer.
-
-
-
Method Detail
-
buffer
ByteBuffer buffer()
Get the buffer instance.Note: the buffer must not be accessed after the
clean()
method has been called.- Returns:
- The
ByteBuffer
instance.
-
clean
void clean()
Deallocate 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.
-
-