开发者

Persistent hashtable (to use with Java) [closed]

Closed. This question is seeking recommendations for books, tools, software libraries, and more. It does not meet Stack Overflow guidelines 开发者_如何学Cguidelines. It is not currently accepting answers.

We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.

Closed 5 years ago.

Improve this question

I want to use a persistent HashTable to provide data storage for my application. Is this possible. A large well supported open-source project would be ideal.


You have 2 options :

a) Seralize your Hashtable to file -- after all the Hashtable class implements Serializable.

b) BerkeleyDB Java Edition -- you can download this for free from Oracle. It is open source. Berkeley DB database is a b-tree. It is fairly straight forward to convert your code from HashTable to Berkeley DB .

Note that if you use simple Hashtable for storing your objects, you will run out out memory when the number of obects in Hashtable increases beyond a certain number. With Berkeley DB, there is no such limitation.


Chronicle Map is an off-heap key-value store for Java, providing ConcurrentMap interface and (optionally) persists data to disk. Under the hood, it's implemented via memory-mapped files.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜