Top Description Fields Constructors Methods
org.h2.util

public final Class MemoryUnmapper

extends Object
Class Inheritance
Imports
java.lang.reflect.Field, .Method, java.nio.ByteBuffer, org.h2.engine.SysProperties

Unsafe memory unmapper.
See Also
SysProperties#NIO_CLEANER_HACK

Field Summary

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

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static boolean

Returns:

whether operation was successful
unmap
(ByteBuffer
mapped byte buffer
buffer
)

Tries to unmap memory for the specified byte buffer using Java internals in unsafe way if SysProperties#NIO_CLEANER_HACK is enabled and access is not denied by a security manager.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

ENABLEDback to summary
private static final boolean ENABLED
INVOKE_CLEANERback to summary
private static final Method INVOKE_CLEANER
UNSAFEback to summary
private static final Object UNSAFE

Constructor Detail

MemoryUnmapperback to summary
private MemoryUnmapper()

Method Detail

unmapback to summary
public static boolean unmap(ByteBuffer buffer)

Tries to unmap memory for the specified byte buffer using Java internals in unsafe way if SysProperties#NIO_CLEANER_HACK is enabled and access is not denied by a security manager.

Parameters
buffer:ByteBuffer

mapped byte buffer

Returns:boolean

whether operation was successful