Following up on this question, it seems that a file- or disk-based Map
implementation may be the right solution to the problems I mentioned there.
I came accross jdbm2 a few weeks ago. The usage is very simple. You should be able to get it to work in half an hour. One drawback is that the object which is put into the map must be serializable, i.e. implement Serializable
. Other Cons are given in their website.
However, all object persistence database are not a permanent solution for storing objects of you own java class. If you decide to make change to the fields of the class, you will no longer be able to reteive the object from the map collection. It is ideal to store standard serializable classes line String
, Integer
, etc.