ConcurrentHashMap with weak keys and identity hash?

后端 未结 4 2080
没有蜡笔的小新
没有蜡笔的小新 2020-12-16 12:36

How do I get a ConcurrentHashMap with weak keys and identity hashes in Java? I think Google Guava Collections can give such a thing, but can I get it from the s

4条回答
  •  盖世英雄少女心
    2020-12-16 13:25

    search ConcurrentWeakIdentityHashMap, you will get many examples. I wrote an implement myself, for I think the hashCode of org/ehcache/core/internal/util/ConcurrentWeakIdentityHashMap$WeakReference is so bad.

    Example of ehcache3

    Example I wrote

    Pull Rquest to fix the ehcache3 ConcurrentWeakIdentityHashMap Key hashCode

提交回复
热议问题