[jboss-dev-forums] [Design of JBossCache] - Re: Lock striping broken for Second Level Cache use case
jason.greene@jboss.com
do-not-reply at jboss.com
Wed Mar 18 14:15:33 EDT 2009
"bstansberry at jboss.com" wrote :
| Can you use a putIfAbsent instead of a get to try to preserve the original lock? Idea being that if threads are waiting on the original lock you try to keep using it rather than having them queue up on a new lock.
|
Yes this is better, although still sucks when you have contended access on a Lock. I think it might make more sense to keep locks around and evict them later, either when the key is removed/evicted, or some other special lock eviction algorithm that uses timestamps.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4219200#4219200
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4219200
More information about the jboss-dev-forums
mailing list