[infinispan-issues] [JBoss JIRA] (ISPN-9780) compute* implementations for Hot Rod clients

Tristan Tarrant (Jira) issues at jboss.org
Sun Oct 27 16:09:15 EDT 2019


     [ https://issues.jboss.org/browse/ISPN-9780?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

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)



--
This message was sent by Atlassian Jira
(v7.13.8#713008)


More information about the infinispan-issues mailing list