Top Description Fields Constructors Methods
io.undertow.server

public final Class DirectByteBufferDeallocator

extends Object
Class Inheritance
Imports
java.lang.reflect.Field, .Method, java.nio.ByteBuffer, java.security.AccessController, .PrivilegedAction, io.undertow.UndertowLogger, sun.misc.Unsafe

DirectByteBufferDeallocator Utility class used to free direct buffer memory.

Field Summary

Modifier and TypeField and Description
private static final Method
private static final Method
private static final boolean
private static final Unsafe

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static void
free(ByteBuffer
to deallocate
buffer
)

Attempts to deallocate the underlying direct memory.

private static Method
getAccesibleMethod(String className, String methodName)

private static Method
getAccesibleMethod0(String className, String methodName)

private static Method
getDeclaredMethod(Unsafe tmpUnsafe, String methodName, Class<?>... parameterTypes)

private static Method
getDeclaredMethod0(Unsafe tmpUnsafe, String methodName, Class<?>... parameterTypes)

private static Unsafe
private static Unsafe
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

cleanerback to summary
private static final Method cleaner
cleanerCleanback to summary
private static final Method cleanerClean
SUPPORTEDback to summary
private static final boolean SUPPORTED
UNSAFEback to summary
private static final Unsafe UNSAFE

Constructor Detail

DirectByteBufferDeallocatorback to summary
private DirectByteBufferDeallocator()

Method Detail

freeback to summary
public static void free(ByteBuffer buffer)

Attempts to deallocate the underlying direct memory. This is a no-op for buffers where ByteBuffer#isDirect() returns false.

Parameters
buffer:ByteBuffer

to deallocate

getAccesibleMethodback to summary
private static Method getAccesibleMethod(String className, String methodName)
getAccesibleMethod0back to summary
private static Method getAccesibleMethod0(String className, String methodName)
getDeclaredMethodback to summary
private static Method getDeclaredMethod(Unsafe tmpUnsafe, String methodName, Class<?>... parameterTypes)
getDeclaredMethod0back to summary
private static Method getDeclaredMethod0(Unsafe tmpUnsafe, String methodName, Class<?>... parameterTypes)
getUnsafeback to summary
private static Unsafe getUnsafe()
getUnsafe0back to summary
private static Unsafe getUnsafe0()