|
GlueGen v2.6.0-rc-20250712
GlueGen, Native Binding Generator for Java (public API).
|
Utility methods allowing easy access to certain sun.misc.Unsafe functionality.
More...
Static Public Member Functions | |
| static boolean | hasInvokeCleaner () |
Returns true if sun.misc.Unsafe.invokeCleaner(java.nio.ByteBuffer) is available and has not caused an exception. More... | |
| static boolean | invokeCleaner (final ByteBuffer bb) |
Access to sun.misc.Unsafe.invokeCleaner(java.nio.ByteBuffer). More... | |
| static boolean | hasIllegalAccessLoggerAccess () |
Returns true if access to jdk.internal.module.IllegalAcessLogger's logger field is available and has not caused an exception. More... | |
| static< T > T | doWithoutIllegalAccessLogger (final PrivilegedAction< T > action) throws RuntimeException |
Issue the given user action while jdk.internal.module.IllegalAcessLogger's logger has been temporarily disabled. More... | |
Protected Member Functions | |
| UnsafeUtil () | |
Utility methods allowing easy access to certain sun.misc.Unsafe functionality.
Definition at line 44 of file UnsafeUtil.java.
|
protected |
Definition at line 51 of file UnsafeUtil.java.
|
static |
Issue the given user action while jdk.internal.module.IllegalAcessLogger's logger has been temporarily disabled.
The caller shall place this call into their own SecurityUtil#doPrivileged(PrivilegedAction) block.
In case the runtime is not PlatformPropsImpl#JAVA_9 or the logger is not accessible or disabling caused an exception, the user action is just executed w/o temporary logger modifications.
| action | the user action task |
| RuntimeException | is thrown for a caught Throwable while executing the user action |
Definition at line 184 of file UnsafeUtil.java.
|
static |
Returns true if access to jdk.internal.module.IllegalAcessLogger's logger field is available and has not caused an exception.
Definition at line 169 of file UnsafeUtil.java.
|
static |
Returns true if sun.misc.Unsafe.invokeCleaner(java.nio.ByteBuffer) is available and has not caused an exception.
Definition at line 137 of file UnsafeUtil.java.
|
static |
Access to sun.misc.Unsafe.invokeCleaner(java.nio.ByteBuffer).
If b is an direct NIO buffer, i.e sun.nio.ch.DirectBuffer, calls it's sun.misc.Cleaner instance clean() method once.
true if successful, otherwise false. Definition at line 148 of file UnsafeUtil.java.