@Test @DisplayName("isValid()") void isValid() { assumeTrue(mmanager != null); assertThat(mmanager.isValid()).isTrue(); }
@Override @Contract(pure = true) public boolean isValid() { if (DEBUG >= LOG_TRACE) log.trace("Checking if the native library is loaded."); try { return c_is_valid(); } catch (final UnsatisfiedLinkError e) { return false; } }
JniMemoryManager implements MemoryManager { @Override @Contract(pure = true) public boolean isValid() { if (DEBUG >= LOG_TRACE) log.trace("Checking if the native library is loaded."); try { return c_is_valid(); } catch (final UnsatisfiedLinkError e) { return false; } } }
JniMemoryManager implements MemoryManager { @Override @Contract(pure = true) public boolean isValid() { if (DEBUG >= LOG_TRACE) log.trace("Checking if the native library is loaded."); try { return c_is_valid(); } catch (final UnsatisfiedLinkError e) { return false; } } @SuppressWarnings("ResultOfMethodCallIgnored")  JniMemoryManager(); }
JniMemoryManager implements MemoryManager { @Override @Contract(pure = true) public boolean isValid() { if (DEBUG >= LOG_TRACE) log.trace("Checking if the native library is loaded."); try { return c_is_valid(); } catch (final UnsatisfiedLinkError e) { return false; } } @SuppressWarnings("ResultOfMethodCallIgnored")  JniMemoryManager(); @Override @Contract(pure = true) boolean isValid(); @Override @Contract(pure = true) int getAddressSize(); @Override @Contract(pure = true) long getPageSize(); @Override @Contract(pure = true) long getHugepageSize(); @Override @Contract(pure = true) @SuppressWarnings("BooleanParameter") long allocate(long bytes, final boolean huge, final boolean lock); @Override @SuppressWarnings("BooleanParameter") void free(long address, long bytes, final boolean huge, final boolean lock); @Override @Contract(pure = true) @SuppressWarnings({"BooleanParameter", "IOResourceOpenedButNotSafelyClosed", "resource"}) long mmap(final @NotNull File file, final boolean huge, final boolean lock); @Override @SuppressWarnings("BooleanParameter") void munmap(final long address, final @NotNull File file, final boolean huge, final boolean lock); @Override @Contract(pure = true) byte getByte(final long address); @Override @Contract(pure = true) short getShort(final long address); @Override @Contract(pure = true) int getInt(final long address); @Override @Contract(pure = true) long getLong(final long address); @Override @Contract(pure = true) byte getByteVolatile(final long address); @Override @Contract(pure = true) short getShortVolatile(final long address); @Override @Contract(pure = true) int getIntVolatile(final long address); @Override @Contract(pure = true) long getLongVolatile(final long address); @Override void putByte(final long address, final byte value); @Override void putShort(final long address, final short value); @Override void putInt(final long address, final int value); @Override void putLong(final long address, final long value); @Override void putByteVolatile(final long address, final byte value); @Override void putShortVolatile(final long address, final short value); @Override void putIntVolatile(final long address, final int value); @Override void putLongVolatile(final long address, final long value); @Override void get(final long src, int bytes, final @NotNull byte[] dest, final int offset); @Override void put(final long dest, int bytes, final @NotNull byte[] src, final int offset); @Override @Contract(pure = true) long virt2phys(final long address); }
JniMemoryManager implements MemoryManager { @Override @Contract(pure = true) public boolean isValid() { if (DEBUG >= LOG_TRACE) log.trace("Checking if the native library is loaded."); try { return c_is_valid(); } catch (final UnsatisfiedLinkError e) { return false; } } @SuppressWarnings("ResultOfMethodCallIgnored")  JniMemoryManager(); @Override @Contract(pure = true) boolean isValid(); @Override @Contract(pure = true) int getAddressSize(); @Override @Contract(pure = true) long getPageSize(); @Override @Contract(pure = true) long getHugepageSize(); @Override @Contract(pure = true) @SuppressWarnings("BooleanParameter") long allocate(long bytes, final boolean huge, final boolean lock); @Override @SuppressWarnings("BooleanParameter") void free(long address, long bytes, final boolean huge, final boolean lock); @Override @Contract(pure = true) @SuppressWarnings({"BooleanParameter", "IOResourceOpenedButNotSafelyClosed", "resource"}) long mmap(final @NotNull File file, final boolean huge, final boolean lock); @Override @SuppressWarnings("BooleanParameter") void munmap(final long address, final @NotNull File file, final boolean huge, final boolean lock); @Override @Contract(pure = true) byte getByte(final long address); @Override @Contract(pure = true) short getShort(final long address); @Override @Contract(pure = true) int getInt(final long address); @Override @Contract(pure = true) long getLong(final long address); @Override @Contract(pure = true) byte getByteVolatile(final long address); @Override @Contract(pure = true) short getShortVolatile(final long address); @Override @Contract(pure = true) int getIntVolatile(final long address); @Override @Contract(pure = true) long getLongVolatile(final long address); @Override void putByte(final long address, final byte value); @Override void putShort(final long address, final short value); @Override void putInt(final long address, final int value); @Override void putLong(final long address, final long value); @Override void putByteVolatile(final long address, final byte value); @Override void putShortVolatile(final long address, final short value); @Override void putIntVolatile(final long address, final int value); @Override void putLongVolatile(final long address, final long value); @Override void get(final long src, int bytes, final @NotNull byte[] dest, final int offset); @Override void put(final long dest, int bytes, final @NotNull byte[] src, final int offset); @Override @Contract(pure = true) long virt2phys(final long address);  }