[infinispan-issues] [JBoss JIRA] (ISPN-5035) DeltaAware support for conditional operations
Radim Vansa (JIRA)
issues at jboss.org
Tue Dec 2 04:07:40 EST 2014
[ https://issues.jboss.org/browse/ISPN-5035?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13024330#comment-13024330 ]
Radim Vansa edited comment on ISPN-5035 at 12/2/14 4:07 AM:
------------------------------------------------------------
I've realized that it can be done using DeltaAware. However, the return value is always the old value, which is quite limiting and can use more bandwidth than necessary, and more complicated conditions require double verification of the return value (to check if the operation could be done on the remote side).
was (Author: rvansa):
I've realized that it can be done using DeltaAware. However, the return value is always the old value, which is quite limiting and can use more bandwidth than necessary.
> DeltaAware support for conditional operations
> ---------------------------------------------
>
> Key: ISPN-5035
> URL: https://issues.jboss.org/browse/ISPN-5035
> Project: Infinispan
> Issue Type: Feature Request
> Components: Core
> Reporter: Radim Vansa
>
> Current delta-aware approach is implemented only in PutKeyValueCommand and ApplyDeltaCommand. This implementation does not allow to execute conditional delta-aware commands - or rather it does not allow to return any kind of value (the condition itself can be implemented inside the delta).
> One use-case when this would be required is equivalent of AtomicLong.getAndIncrement(). Currently we can implement this using
> {code}
> Long previous;
> do {
> previous = cache.get(key);
> } while (cache.replace(key, previous, previous + 1);
> {code}
> which requires at least two RPCs. With more generic interface, such as JCache's EntryProcessor this could be implemented using single RPC.
> (so, this JIRA is basically a request to native support for EntryProcessor)
--
This message was sent by Atlassian JIRA
(v6.3.8#6338)
More information about the infinispan-issues
mailing list