private static MethodHandle unmapJava9(MethodHandles.Lookup lookup) throws ReflectiveOperationException {
        Class<?> unsafeClass = Class.forName("sun.misc.Unsafe");
        MethodHandle unmapper = lookup.findVirtual(unsafeClass, "invokeCleaner",
                methodType(void.class, ByteBuffer.class));
        Field f = unsafeClass.getDeclaredField("theUnsafe");
        f.setAccessible(true);
        Object theUnsafe = f.get(null);
        return unmapper.bindTo(theUnsafe);
    }
Unmap the provided mapped or direct byte buffer.

This buffer cannot be referenced after this call, so it's highly recommended that any fields referencing it
should be set to null.

@throws IllegalArgumentException if buffer is not mapped or direct.
clients/src/main/java/org/apache/kafka/common/utils/ByteBufferUnmapper.java