[英]Most efficient way to read list of values from Hazelcast Map
We are using Hazelcast as a cache and want to read a list of 50 items from a single map.我们使用 Hazelcast 作为缓存,并希望从单个地图中读取 50 个项目的列表。 Currently we are seeing quite a long delay reading this list ~20ms.
目前,我们看到阅读此列表有相当长的延迟~20 毫秒。 Reading a single entry is extremely quick but it seems this is scaling quite badly.
读取单个条目的速度非常快,但似乎扩展性很差。 I have tried using the Imap methods of
我曾尝试使用 Imap 方法
Is there a better way to do this or do I need to rethink the way we are caching/using Hazelcast to reduce the get call on the map to a single call somehow.有没有更好的方法来做到这一点,或者我是否需要重新考虑我们缓存/使用 Hazelcast 以某种方式将地图上的 get 调用减少到单个调用的方式。
Few bits of additional info一些额外的信息
I guess it depends a lot on the exact setup, but from your question, it looks as you didn't try entrySet()
.我想这在很大程度上取决于确切的设置,但是从您的问题来看,您似乎没有尝试过
entrySet()
。
I believe that would be the fastest.我相信那会是最快的。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.