A colleague mentioned that he heard about a lightweight collection which would automatically page out to disk when it’s contents got too full – but he couldn’t remember the name. I would imagine it looks something like this:
PagingCollection<Serializable> pagingCollection = new PagingArrayList<>();
pagingCollection.setMaxSizeInMemory(500);
for (int x = 0; x < 1000; x++) { pagingcollection.add("x="+x); }
Which would then push x=0 to x=500 to disk. The key would be being able to iterate over it without loading the whole thing into memory..
This is for a thick client with low amounts of memory.
Does anyone know of it (or something similar)?
Well, the only tools I know that has this kind of features are the prevalence systems : prevayler and space4j (the later seems to no more have a dedicated website, but to be still available … on Sourceforge). Although their interface will seems weird to you at first, they are however quite simple to use and offer a convenient feature set.