[infinispan-issues] [JBoss JIRA] (ISPN-8310) LockedStream invokeAll

William Burns (JIRA) issues at jboss.org
Fri Sep 22 14:29:00 EDT 2017


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

William Burns updated ISPN-8310:
--------------------------------
    Description: 
We need a way to run a command for all data in the cache (while under a lock) but also return a value for the data processed.

There are a few different APIs we could do for this having a {{Cache<K, V>}}

blocking variant
{code}
<R> Map<K, R> evalAll(BiFunction<Cache<K, V>, ? super CacheEntry<K, V>, R> biFunction)
{code}

back pressure aware variant  - this would have to be a hot observer on subscribe
{code}
<R> Publisher<R> evalAll(BiFunction<Cache<K, V>, ? super CacheEntry<K, V> R> biFunction)
{code}

  was:
We need a way to run a command for all data in the cache (while under a lock) but also return a value for the data processed.

There are a few different APIs we could do for this having a {{Cache<K, V>}}

blocking variant
{code}
<R> Map<K, R> evalAll(BiFunction<Cache<K, V>, ? super CacheEntry<K, V>, R> biFunction)
{code}

back pressure aware variant  - this would have to be a hot observer on subscribe
{code}
<R> Producer<R> evalAll(BiFunction<Cache<K, V>, ? super CacheEntry<K, V> R> biFunction)
{code}



> LockedStream invokeAll
> ----------------------
>
>                 Key: ISPN-8310
>                 URL: https://issues.jboss.org/browse/ISPN-8310
>             Project: Infinispan
>          Issue Type: Feature Request
>            Reporter: William Burns
>            Assignee: William Burns
>             Fix For: 9.2.0.Alpha1
>
>
> We need a way to run a command for all data in the cache (while under a lock) but also return a value for the data processed.
> There are a few different APIs we could do for this having a {{Cache<K, V>}}
> blocking variant
> {code}
> <R> Map<K, R> evalAll(BiFunction<Cache<K, V>, ? super CacheEntry<K, V>, R> biFunction)
> {code}
> back pressure aware variant  - this would have to be a hot observer on subscribe
> {code}
> <R> Publisher<R> evalAll(BiFunction<Cache<K, V>, ? super CacheEntry<K, V> R> biFunction)
> {code}



--
This message was sent by Atlassian JIRA
(v7.2.3#72005)


More information about the infinispan-issues mailing list