Hopefully, this is the last of major edits to the core Java8 Memory before I integrate Java 17.
In this group of edits:
I implemented non-owner thread detection for the methods that create and close memory-mapped files and direct, off-heap memory segments. It would be risky to allow a non-owner thread to close these resources even if it is performed in a synchronized wrapper. This only affects the methods close(), load(), isLoaded(), and force(). This is clearly documented in the concomitant Javadocs.
I was able to simplify the 16 leaf node classes by moving common variables down to the root ResourceImpl class.
I removed some other duplication of methods.
The major task was to completely remove methods that would be incompatible with the Java17 Panama API. This will likely require more tweaking as I merge in the Java 17 Panama code.
Hopefully, this is the last of major edits to the core Java8 Memory before I integrate Java 17.
In this group of edits: