[jboss-jira] [JBoss JIRA] Closed: (JBCACHE-301) putIfAbsent(), putIfNull(), putIfEquals() etc
Manik Surtani (JIRA)
jira-events at jboss.com
Wed Jul 19 01:58:11 EDT 2006
[ http://jira.jboss.com/jira/browse/JBCACHE-301?page=all ]
Manik Surtani closed JBCACHE-301.
---------------------------------
Resolution: Done
> 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: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list