We don’t allow questions seeking recommendations for software libraries, tutorials, tools, books, or other off-site resources. You can edit the question so it can be answered with facts and citations.
Closed 9 years ago.
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(10)
您可以尝试 Hazelcast。只需将 hazelcast.jar 添加到您的类路径中即可。并开始编码
您将获得一个运行速度超快的内存中、分布式、动态可扩展的数据网格。
You can try Hazelcast. Just add hazelcast.jar to your classpath. And start coding
You'll get an in-memory, distributed, dynamically scalable data grid which performs super fast.
你的问题可能意味着两件事之一。
如果您指的是用于存储键值对的数据结构,请使用
Map
实例是 JDK 的标准部分。但是,如果您想要内存中的键值存储,那么我建议您查看 EHCache 甚至 < a href="http://memcached.org/" rel="nofollow noreferrer">memcached。
Your question could mean one of two things.
If you mean a data structure for storing key-value pairs, use one of the
Map
instances that are a standard part of the JDK.If however you are after an in-memory key-value store then I would suggest taking a look at EHCache or even memcached.
Chronicle-Map 是一个强大的替代方案。
java.util.Map
实现Chronicle-Map is a strong alternative.
java.util.Map
implementationHashMap?
HashMap?
我知道这是一篇两年前的帖子,但我最近一直在搞 Infinispan 和到目前为止我很喜欢。无论如何,我都不是专家,但对我来说,设置一个具有几个节点的分布式缓存并不太困难,并且我在大约一个小时内从它们中提取了一些数据。
I know this is a two-year old post but I've been messing around with Infinispan recently and I like it so far. I'm not an expert by any means but it was not too difficult for me to set up a distributed cache with a few nodes and I was pulling some data from them in about an hour.
MapDb 是 Berkley 的替代品,具有友好的 Apache 2 许可证。
MapDb is an alternative to Berkley with a friendly Apache 2 license.
jdbm 非常适合此类事情。它旨在以分页文件的形式存储在磁盘上,提供基本事务支持(不保证隔离,但涵盖 ACD)。我们已经在具有相当广泛部署的生产系统中使用了它,并且对性能、稳定性等非常满意......
jdbm works great for this sort of thing. It's intended for storing on disk in a paged file, provides for basic transaction support (no guarantees on isolation, but ACD are covered). We've used it in a production system with fairly wide deployment and have been quite pleased with the performance, stability, etc...
考虑使用 jredis。它是 Redis(持久键值存储)的 Java 客户端。还有一个 JDBC 驱动程序:code.google.com/p/jdbc-redis/。
Consider using jredis. It's a Java client for Redis, a persistent key-value store. There's also a JDBC driver for it: code.google.com/p/jdbc-redis/.
有轻量级或嵌入式数据库,如 HSQLDB、Derby、SQLite
但就像其他人不明白为什么你需要一个数据库来存储键/值......
为什么不是一个地图?
需要在应用程序重新启动时保留键/值?
另外,它可能不是您所需要的,但是在最新的浏览器上使用 html5,您可以使用 localStorage 来使用 javascript 在浏览器中存储键/值。
There are lightweigh or embedded dbs like HSQLDB, Derby, SQLite
But like others don't understand why you need a db to store key/values...
Why not a Map?
Need to keep key/values on app reboot?
Also it's perhaps not what you need but with html5 on up to date browsers you have localStorage that permits you to store key/values in the browser using javascript.
我建议尝试 Redisson。您将能够在高性能键值之上使用分布式和可扩展的
Map
或ConcurrentMap
以及其他(Set、List、Queue、Lock ...)实现Redis 服务器。简单的例子:
I would recommend to try a Redisson. You will able to use distributed and scalable
Map
orConcurrentMap
and other (Set, List, Queue, Lock ...) implementations on top of high performance key-value Redis server.Easy example: