Comments (1)
Hi xxiaozaichu,
Sorry for the long delay, but I will try to become active again. Life keeps you
scrambling to keep up. :)
Thanks for reporting the issue, but alas its not a bug!
The Identity was introduced because #containsValue() needs to perform an
equality
check. I saw that ConcurrentHashMap's implementation locks the entire
hashtable,
commenting that it was done due to the ABA problem. While I understood the
comment,
I didn't see why it would be a concern. So instead of using an iterator I
introduced
the Identity to conform to the implementation semantics. I plan to weaken it by
using an Iterator<V> and allow for the ABA problem now that I feel more
comfortable
with it.
The Identity is just a pass through for reference checks. The #remove(key,
value)
returns back a boolean on success. However, I need the Node<K, V> instance in
order
to unlink it from the list. So instead I get the instance, perform the value
check,
and try to remove it conditionally. If successful, I can unlink the node.
You are welcome to look at the unit tests to validate that this works
correctly.
Please let me know if you see any flaw in my logic.
Original comment by [email protected]
on 20 Oct 2009 at 8:05
- Changed state: Invalid
from concurrentlinkedhashmap.
Related Issues (20)
- Make capacity and weightedSize long HOT 6
- Remove catch-up executor (failed experiment) HOT 4
- Cache capacity limitation of being an Integer HOT 5
- Provide getQuiet() method? HOT 8
- Bloom filter example has mistakes in setAt: div and mod by Long.SIZE instead HOT 2
- Concurrent LIRS cache implementation HOT 13
- Could you please release a new version (and push to maven) HOT 5
- concurrentlinkedhashmap don't include the license file HOT 2
- gson deserialize fail HOT 1
- Make ConcurrentLinkedHashMap available as an OSGi bundle HOT 7
- where is the cache stats HOT 1
- Cannot start as OSGi bundle HOT 2
- Excessive memory usage due to padding HOT 5
- build problem with OpenJDK 1,8 HOT 10
- Are you considering moving this to Caffeine? HOT 4
- build failure... HOT 2
- Google App Engine error: sun.misc.Unsafe is a restricted class HOT 4
- Java 9 compatibility HOT 4
- massive memory usage with 1024 core machine HOT 10
- Relation between data.size and capacity HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from concurrentlinkedhashmap.