ignite-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vdpyatkov <vldpyat...@gmail.com>
Subject Re: what are the differences between put and replace method
Date Wed, 17 Aug 2016 09:06:56 GMT
Hello,

Replace method is equivalent to the code snippet:

/if (cache.containsKey(key)) {
   cache.put(key, value);
   return true;
 } else {
   return false;
 }/

Can you lock at the jcache Javadoc:
http://ignite.apache.org/jcache/1.0.0/javadoc/javax/cache/Cache.html#replace(K,
V)
http://ignite.apache.org/jcache/1.0.0/javadoc/javax/cache/Cache.html#put(K,
V)


timothy wrote
> what are the differences between put and replace API? in the document,
> replace method is described as Atomic method





--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/what-are-the-differences-between-put-and-replace-method-tp7117p7128.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Mime
View raw message