Before giving any answers, I would start by asking why I need to store this hash table on disk, because according to your description the data set is small, and therefore I assume that it can fit into memory. If it is simple to reuse this structure after restarting the application, then you can probably use any format to save it.
Secondly, you are not giving any reason why Redis or MongoDB are not ideal. Based on your (short) 3 requirements, I would say Redis is probably the best choice:
- good java clients
- not only can store lists, but also supports operations on list values ββ(therefore data is not opaque)
The only reason I could have suggested that you eliminate Redis is because you are looking for stringent ACID features. If this is what you are looking for, you could take a look at BerkleyDB JE. It has been a while, and the documentation is good.
source share