Thank you for those references! The docs by Ben Manes look like a good
starting point to learn more about implementing a concurrent cache.
To elaborate on my motivation: I work as an educator explaining concepts
behind Java extensions in a corporate context. LRU caches seemed like an
interesting
Ah, so you want a concurrent cache! This is why it's important to talk about use
cases. Turns out there are a lot of subtle issues here, and there has been a lot of
work in this area outside the JDK. For example, a bit of searching turned up this
Stack Overflow question [1]. The answers aren't p
Hi Stuart.
Thanks, I understand now how the limited thread safety of "synchronized"
wrappers has led to not adding new ones.
My use case is an LRU-cache that is accessed by a large number of (virtual)
threads.
In my initial implementation I constructed a LinkedHashMap passing true for
the access
Hi Sebastian,
Regarding the lack of "synchronized" wrappers for Sequenced Collections: the main
issue is that they provide only a limited sense of "thread safety" and as such don't
add much actual value. Specifically, the synchronized wrappers hold a lock only
around invocations of individual
Hello.
I am new to this list so might have missed previous discussion about this
but could not find what I was looking for in the archives.
The Sequenced collections JEP adds the following static methods to
java.util.Collections.
- unmodifiableSequencedCollection
- unmodifiableSequencedSet
- unm