MapDB provides concurrent Maps, Sets and Queues backed by disk storage or off-heap-memory. It is a fast and easy to use embedded Java database engine.
MapDB combines embedded database engine and Java collections. It is free under Apache 2 license. MapDB is flexible and can be used in many roles:
org.mapdb mapdb VERSION
//import org.mapdb.* DB db = DBMaker.memoryDB().make(); ConcurrentMap map = db.hashMap("map").make(); map.put("something", "here");
MapDB is written in Kotlin, you will need IntelliJ Idea.
You can use Gradle to build MapDB.
MapDB is extensively unit-tested. By default, only tiny fraction of all tests are executed, so build finishes under 10 minutes. Full test suite has over million test cases and runs for several hours/days. To run full test suite, set
Longer unit tests might require more memory. Use this to increase heap memory assigned to unit tests:
By default unit tests are executed in 3 threads. Thread count is controlled by
On machine with limited memory you can change fork mode so unit test consume less RAM, but run longer: