Btree4j is a disk-based Prefix B+-tree written in Pure Java.
It's pretty fast and 100k ops/sec is expected even on laptop.
<dependency> <groupId>io.github.myui</groupId> <artifactId>btree4j</artifactId> <version>0.9.0</version> </dependency>
Find usage in unit tests.
Applied many improvements over the original Xindice's implementation as follows:
Rudolf Bayer and Karl Unterauer. "Prefix B-trees", Proc. ACM Trans. Database Syst. 2, 1, pp.11-26), March 1977. [DOI]
Support both unique and non-unique indexing. Storing duplicate keys is allowed for non-unique indexing.
Index file based on B+-tree is supported. Multiple values per a key is also supported.
<bytes KEY, byte VALUE> with VALUE stored on distinct data pages and pointers to them are managed by B+-Tree to avoid consuming many disk pages for large values in B+-tree.
Deletion and updates are, of course, supported.
Support efficient Bulk-loading.
Minimum dependencies to external libraries. Runs on Java 8 or later.
No sponsors yet. Will you be the first?
It will be my motivation to continue working on this project.
Copyright 2006 and onwards Makoto Yui
Copyright 1999-2007 The Apache Software Foundation