]
Manik Surtani commented on JBCACHE-301:
---------------------------------------
putIfNull() implemented. Limited use for other such helpers, such as putIfEquals()?
putIfAbsent(), putIfNull(), putIfEquals() etc
---------------------------------------------
Key: JBCACHE-301
URL:
http://jira.jboss.com/jira/browse/JBCACHE-301
Project: JBoss Cache
Issue Type: Feature Request
Security Level: Public(Everyone can see)
Reporter: Bela Ban
Assigned To: Manik Surtani
Fix For: 2.0.0
atomic operations, this can avoid code like
Object o=cache.get(FQN, KEY);
if(o != null && COND.equals(o)) {
cache.put(FQN, KEY, myObj);
}
This is replaced with cache.putIfEquals(FQN, KEY, COND, myObj);
Another example:
if(!cache.exists(FQN, KEY))
cache.put(FQN, KEY, VAL);
can be replaced with
cache.putIfAbsent(FQN, KEY, VAL)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: