将ConcurrentLinkedHashMap集成到Guava中意味着什么? [英] What does it mean that ConcurrentLinkedHashMap has been integrated into Guava?

查看:378
本文介绍了将ConcurrentLinkedHashMap集成到Guava中意味着什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们使用 https://code.google.com/p/concurrentlinkedhashmap/在一个项目中我看到了一条说明,它在2010年被集成到了Guava的MapMaker和CacheBuilder中。信息非常简短:

We use ConcurrentLinkedHashMap from https://code.google.com/p/concurrentlinkedhashmap/ in a project and I saw a note that it was integrated into Guava's MapMaker and CacheBuilder back in 2010. The info is very brief:

算法的集成MapMaker的技术将在Google Guava r08中发布,并且很大程度上基于此版本。

这究竟是什么意思?


  • concurrentlinkedhashmap项目似乎仍处于活动状态。

  • 它只是一次性集成以引导Guava缓存包吗?

  • 自2010年以来,这两个项目是否独立发展?

  • 如果是这样,今天它们之间的主要区别是什么?

  • The concurrentlinkedhashmap project seems to be still active.
  • Was it just a one time integration to bootstrap the Guava cache package?
  • Have the two projects evolved independently since 2010?
  • If so, what are the main differences between them today?

推荐答案


究竟是什么意思?

What does it mean exactly?

番石榴是长期替代品,大多数时候你应该用它。历史是ConcurrentLinkedHashMap找出算法,Guava包含它,然后专注于添加功能。

Guava is the long term replacement and most of the time you should use it. The history is that ConcurrentLinkedHashMap figured out the algorithms, Guava subsumed it, and then focused on adding features.


concurrentlinkedhashmap项目似乎仍然是活跃。

The concurrentlinkedhashmap project seems to be still active.

它一直是一个周末项目,所以活跃意味着我有一个划痕痒或响应变更请求。在CLHM中试验比使用番石榴更容易,所以在我们将它们移植之前,我倾向于证明那里的想法。我与Guava的合作是20%-er。

It has always been a weekend project, so active means that I have a scratch to itch or responded to a change request. It is also easier to experiment in CLHM than Guava, so I tended to prove out ideas there prior us porting them over. My involvement with Guava was as a 20%-er.


它只是一次性集成来引导Guava缓存包吗?

Was it just a one time integration to bootstrap the Guava cache package?

是的。我们首先彻底检查了MapMaker,然后将缓存拆分为专用API。这是将想法和改进单向迁移到番石榴。

Yes. We first overhauled MapMaker and then split out caching into a dedicated API. It is a one-way migration of ideas and improvements into Guava.


这两个项目自2010年以来是否独立发展?

Have the two projects evolved independently since 2010?

两人都致力于他们的目标。 ConcurrentLinkedHashMap背后的动机是弄清楚如何在不采用快捷方式的情况下编写真正的并发缓存。 Guava背后的目标是提供功能丰富的库,其中包含一个漂亮的API和可靠的实现,以供广泛使用。

Both have stayed dedicated to their goals. The motivation behind ConcurrentLinkedHashMap was to figure out how to write a truly concurrent cache without taking shortcuts. The goal behind Guava is to provide a feature rich library with a beautiful API and solid implementation for broad usage.


两者之间的主要区别是什么他们今天?

What are the main differences between them today?

Guava拥有丰富的功能,并且有一支由Google支持的全职团队。使用它!

Guava is packed with features and has a full time team at Google supporting it. Use it!

ConcurrentLinkedHashMap通过装饰而不是分支ConcurrentHashMap具有更高的绝对并发性。这允许它与 ConcurrentHashMapV8 <一起使用/ a>,它基于一种新算法。 CLHM不依​​赖于段锁,这可以提高写入性能并允许维护单个LRU链。我有一个LIRS政策的实验分支,我希望有一天能完成。

ConcurrentLinkedHashMap has higher absolute concurrency by decorating, instead of forking, ConcurrentHashMap. This allows it to be used with ConcurrentHashMapV8, which is based on a new algorithm. CLHM does not relying on segment locks, which improves write performance and allows for maintaining a single LRU chain. I have an experimental branch with the LIRS policy that I hope to someday finish.

长期的希望是Doug Lea有一天会写一个受我们工作启发的缓存在这个过程中告诉我们一些事情。

The long term hope is that Doug Lea will one day write a cache inspired by our work and teach us a few things in the process.

更新(3/15): Caffeine 是Java 8重写的Guava缓存。它试图提供最好的ConcurrentLinkedHashMap和Guava,使用Java 8进行现代化,并采用自那些以前的项目以来我学到的技术。

Update (3/15): Caffeine is a Java 8 rewrite of Guava's cache. It tries to provide the best of ConcurrentLinkedHashMap and Guava, modernized with Java 8, and adopting the techniques that I've learned since those previous projects.

这篇关于将ConcurrentLinkedHashMap集成到Guava中意味着什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆