https://github.com/lmdbjava/lmdbjava
Lightning Memory Database (LMDB) for Java: a low latency, transactional, sorted, embedded, key-value store
https://github.com/lmdbjava/lmdbjava
database embedded-database in-memory java key-value lmdb low-latency
Last synced: 1 day ago
JSON representation
Lightning Memory Database (LMDB) for Java: a low latency, transactional, sorted, embedded, key-value store
- Host: GitHub
- URL: https://github.com/lmdbjava/lmdbjava
- Owner: lmdbjava
- License: apache-2.0
- Created: 2016-06-05T20:49:04.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2026-01-13T06:32:22.000Z (2 days ago)
- Last Synced: 2026-01-13T08:43:16.671Z (2 days ago)
- Topics: database, embedded-database, in-memory, java, key-value, lmdb, low-latency
- Language: Java
- Homepage:
- Size: 1.89 MB
- Stars: 865
- Watchers: 30
- Forks: 124
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.txt
- Notice: NOTICE.md
Awesome Lists containing this project
- awesome-java - LMDB
- awesome-jvm - lmdbjava - Java API to LMDB (JNR) which is an ultra-fast, ultra-compact key-value embedded data store written in C. (Memory and concurrency)
README
[](https://github.com/lmdbjava/lmdbjava/actions)
[](https://codecov.io/gh/lmdbjava/lmdbjava)
[](http://www.javadoc.io/doc/org.lmdbjava/lmdbjava)
[](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22org.lmdbjava%22%20AND%20a%3A%22lmdbjava%22)
# LMDB for Java
[LMDB](http://symas.com/lmdb/) offers:
* Transactions (full ACID semantics)
* Ordered keys (enabling very fast cursor-based iteration)
* Memory-mapped files (enabling optimal OS-level memory management)
* Zero copy design (no serialization or memory copy overhead)
* No blocking between readers and writers
* Configuration-free (no need to "tune" it to your storage)
* Instant crash recovery (no logs, journals or other complexity)
* Minimal file handle consumption (just one data file; not 100,000's like some stores)
* Same-thread operation (LMDB is invoked within your application thread; no compactor thread is needed)
* Freedom from application-side data caching (memory-mapped files are more efficient)
* Multi-threading support (each thread can have its own MVCC-isolated transaction)
* Multi-process support (on the same host with a local file system)
* Atomic hot backups
**LmdbJava** adds Java-specific features to LMDB:
* [Extremely fast](https://github.com/lmdbjava/benchmarks) across a broad range of benchmarks, data sizes and access patterns
* Modern, idiomatic Java API (including iterators, key ranges, enums, exceptions etc)
* Nothing to install (the JAR embeds the latest LMDB libraries for Linux, OS X and Windows)
* Buffer agnostic (Java `ByteBuffer`, Agrona `DirectBuffer`, Netty `ByteBuf`, your own buffer)
* 100% stock-standard, officially-released, widely-tested LMDB C code (no extra C/JNI code)
* Low latency design (allocation-free; buffer pools; optional checks can be easily disabled in production etc)
* Mature code (commenced in 2016) and used for heavy production workloads (eg > 500 TB of HFT data)
* Actively maintained and with a "Zero Bug Policy" before every release (see [issues](https://github.com/lmdbjava/lmdbjava/issues))
* Available from [Maven Central](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22org.lmdbjava%22%20AND%20a%3A%22lmdbjava%22) and [Central Portal Snapshots](https://central.sonatype.com/repository/maven-snapshots/org/lmdbjava/lmdbjava)
* [Continuous integration](https://github.com/lmdbjava/lmdbjava/actions) testing on Linux, Windows and macOS with Java 8, 11, 17, 21 and 25
### Performance


Full details are in the [latest benchmark report](https://github.com/lmdbjava/benchmarks/blob/master/results/20160710/README.md).
### Documentation
* [Wiki](https://github.com/lmdbjava/lmdbjava/wiki/)
* [Tutorial](https://github.com/lmdbjava/lmdbjava/tree/master/src/test/java/org/lmdbjava/TutorialTest.java)
* [JavaDocs](http://www.javadoc.io/doc/org.lmdbjava/lmdbjava)
* [Change Log](https://github.com/lmdbjava/lmdbjava/wiki/Change-Log)
### Support
We're happy to help you use LmdbJava. Simply
[open a GitHub issue](https://github.com/lmdbjava/lmdbjava/issues) if you have
any questions.
### Building
LmdbJava uses a standard Maven build. Its native libraries are provided by the
[`org.lmdbjava:native`](https://github.com/lmdbjava/native) dependency.
To use a different LMDB library, set `lmdbjava.native.lib` system property to the file path.
### Contributing
Contributions are welcome! Please see the [Contributing Guidelines](CONTRIBUTING.md).
### License
This project is licensed under the
[Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.html).
This project distribution JAR includes LMDB, which is licensed under
[The OpenLDAP Public License](http://www.openldap.org/software/release/license.html).