Java Collection which pages to disk when it gets full?

前端 未结 2 1418
太阳男子
太阳男子 2020-12-05 16:19

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 th

相关标签:
2条回答
  • 2020-12-05 16:59

    Well, the only tools I know that has this kind of features are the prevalence systems : prevayler and space4j. Although their interface will seems weird to you at first, they are however quite simple to use and offer a convenient feature set.

    0 讨论(0)
  • 2020-12-05 17:04

    MapDB (mapdb.org) is a library that supports disk based collections: Sets, Queues and Maps.

    You can choose yourself when to persist it do disk or just persist on every update.

    It also supports caching so all your items will be on disk but some cached in memory.

    0 讨论(0)
提交回复
热议问题