Details
-
Enhancement
-
Resolution: Won't Do
-
Major
-
None
-
None
-
None
Description
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
Long previous; do { previous = cache.get(key); } while (cache.replace(key, previous, previous + 1);
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)