Installation
Build the core from a source checkout, then runmvn install in adapters/java. This installs the adapter into your local Maven repository; Maven Central publishing is pending. The source targets Java 17 or later. Add the dependency to your application:
SharedRegion
create
RuntimeException on failure.
open
buffer
Returns ajava.nio.ByteBuffer backed by the shared memory mapping. No copying occurs.
signal
waitForNotification
true on notification, false on timeout.
close
SharedRegion implements AutoCloseable for try-with-resources:
Complete example
tryWait() consumes a pending notification without blocking.
JNA internals
TheZincLib interface maps the C ABI functions:
libzinc_core.{so,dylib} through its platform-native library loading mechanism. Ensure the library is on java.library.path or use Native.load with an absolute path.
The Pointer.getByteBuffer(offset, length) method creates a direct ByteBuffer wrapping the native memory. The JVM garbage collector does not manage this buffer. It is valid only as long as the region handle is open.