|
jaulib v1.4.1
Jau Support Library (C++, Java, ..)
|
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. | |
| static boolean | invokeCleaner (final ByteBuffer bb) |
Access to sun.misc.Unsafe.invokeCleaner(java.nio.ByteBuffer). | |
| static boolean | hasIllegalAccessLoggerAccess () |
Returns true if access to jdk.internal.module.IllegalAcessLogger's logger field is available and has not caused an exception. | |
| 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. | |
Protected Member Functions | |
| UnsafeUtil () | |
Utility methods allowing easy access to certain sun.misc.Unsafe functionality.
Definition at line 41 of file UnsafeUtil.java.
|
protected |
Definition at line 48 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 AccessController#doPrivileged(PrivilegedAction) block.
In case the runtime is not PlatformProps#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 181 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 166 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 134 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 145 of file UnsafeUtil.java.