[jboss-user] [JBoss Cache: Core Edition] - Re: Are calls to cache.getX methods asynchronized?

manik.surtani@jboss.com do-not-reply at jboss.com
Tue Oct 21 04:22:30 EDT 2008


they are not synchronized, but internal locking is used to maintain consistency between concurrent readers and writers.

Now to optimize for immutable state, as you suggested, there are 2 things you can do:

1.  If you are using JBC 3.x, use MVCC.  There is no cost to readers.  Simple.

2.  If you are using JBC 2.x, use pessimistic locking and set your isolation level to NONE.  But be aware that any concurrent write that may happen could corrupt the state that readers read.



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

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



More information about the jboss-user mailing list