Tristan Tarrant created ISPN-9780:
-------------------------------------
Summary: compute* implementations for Hot Rod clients
Key: ISPN-9780
URL:
https://issues.jboss.org/browse/ISPN-9780
Project: Infinispan
Issue Type: Enhancement
Components: Hot Rod
Reporter: Tristan Tarrant
Fix For: 10.0.0.Final
for (; ; ) {
VersionedValue<V> versioned = cache.getWithMetadata(key);
if (versioned != null) {
return versioned.getValue();
}
V newValue = f(key);
if (cache.putIfAbsent(key, newValue)) {
return newValue;
}
}
(idea
computeIfAbsent(userId, Function<K, V> f)
getOrLock
If locked > v = f() then putAndUnlock(userId, v)
--
This message was sent by Atlassian Jira
(v7.12.1#712002)