Java: large persistent hash structure?

前端 未结 5 2220
[愿得一人]
[愿得一人] 2021-01-05 08:23

I\'m looking for a persistent hash structure in java, a simple key-value store, where key is a unique string and value is an int. The value of a key is to be incremented eac

5条回答
  •  广开言路
    2021-01-05 08:45

    So, if I understand correctly, Redis might be an option. You can issue INCR [key] commands to atomically increment the value associated with that key. If the key does not exist, its set to zero and then incremented (resulting in one). According to the docs, INCR is a constant-time operation. Speed is a primary design goal for Redis.

    Redis is able to persist itself to file, and you can control the parameters on how that happens.

提交回复
热议问题