Skip to content
Java bindings for pmemkv
Java
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
examples
src
.gitignore
CONTRIBUTING.md
ChangeLog
LICENSE
NOTICES.md
README.md
pom.xml

README.md

pmemkv-java

Java bindings for pmemkv

The current API is simplified and not functionally equal to its native C/C++ counterpart. In the future existing API may be extended in idiomatic way without preserving backward compatibility. All known issues and limitations are logged as GitHub issues.

Dependencies

  • Java 8 or higher
  • PMDK - native persistent memory libraries
  • pmemkv - native key/value library
  • pmemkv-jni - JNI integration library
  • Used only for development & testing:

Installation

Start by installing pmemkv on your system.

Next install pmemkv-jni.

It may be necessary to configure a proxy and set JAVA_HOME & JAVA_TOOL_OPTIONS environment variables:

export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
export JAVA_TOOL_OPTIONS=-Dfile.encoding=UTF-8

Clone the pmemkv-java tree:

git clone https://github.com/pmem/pmemkv-java.git
cd pmemkv-java

Finish by installing these bindings:

LD_LIBRARY_PATH=path_to_your_libs mvn install

Testing

This library includes a set of automated tests that exercise all functionality.

LD_LIBRARY_PATH=path_to_your_libs mvn test

Example

We are using /dev/shm to emulate persistent memory in example.

Example can be found within this repository in examples directory. To execute the example:

javac -cp ../target/*.jar BasicExample.java
PMEM_IS_PMEM_FORCE=1 java -ea -Xms1G -cp .:`find ../target -name *.jar` -Djava.library.path=/usr/local/lib BasicExample
You can’t perform that action at this time.