]
Tristan Tarrant updated ISPN-9780:
----------------------------------
Fix Version/s: 10.0.1.Final
(was: 10.0.0.Final)
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
Priority: Major
Labels: keycloak
Fix For: 10.0.1.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)