[infinispan-dev] API behaviour when using DIST

Manik Surtani manik at jboss.org
Fri Apr 24 10:58:11 EDT 2009


On 24 Apr 2009, at 15:48, Bela Ban wrote:

>
>
> Manik Surtani wrote:
>> DIST will always do a get before a write, and this call will be  
>> synchronous.  (the actual write command will be executed remotely  
>> either sync or async based on cache mode)
>
> This will slow down asynchronous PUTs a lot, which is bad.  
> Especially if the putter doesn't care about the return values.
> I assume you'll only do this for put(K,V) which returns the prev  
> value ?

Yes.  But folks who don't care about the retval can specify <unsafe  
unreliableReturnValues />

> So those folks who want async write only and don't care about prev  
> values have to use putAll(Map) ? That's fine but this needs to be  
> stated in the docs

Yes, or use putAll().  And yes, this will be clearly Javadoc'd and in  
the FAQs.  :-)

--
Manik Surtani
manik at jboss.org
Lead, Infinispan
Lead, JBoss Cache
http://www.infinispan.org
http://www.jbosscache.org







More information about the infinispan-dev mailing list