Java built-in keyword storage

I am looking for a permanent keystore for use in my application. In particular:

  • It must be embedded in a Java application. A clean Java solution would be the best.
  • Data must be stored on disk, and storage in memory is not an option. The size of the memory takes an important place, and the total size of the map of the key value can be quite large. Ideally, I would like some kind of LRU cache to be implemented on top of the storage.
  • Both keys and values ​​are strings (no need to support serialization of Java objects, etc.).
  • Parallel reads / writes are important.

What would be the best option in this case?

+5
source share
4 answers

OrientDB (SO info page), , .

, , , .

+5

, , Hazelcast . . .

+3

Voldemort, HashMap, . .

value = store.get()

store.put(, )

store.delete()

oppurtunity, -, , , Redis

+3

I would use SQLite ( SQLite ). This is a relational database, such as a file repository, that allows you to store key values ​​and any other thing you may need. It has a very low area and is pretty fast.

It is very often used in Android applications for all these reasons.

+2
source

All Articles