[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:28:23 EDT 2009


"jason.greene at jboss.com" wrote : "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.

IMO A lazy LRU lock eviction alg that is executed on lock aquire would work very well for this.

View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4219202#4219202

Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4219202



More information about the jboss-dev-forums mailing list