[ 
https://issues.apache.org/jira/browse/NIFI-4043?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16043826#comment-16043826
 ] 

ASF GitHub Bot commented on NIFI-4043:
--------------------------------------

Github user bbende commented on a diff in the pull request:

    https://github.com/apache/nifi/pull/1901#discussion_r121037027
  
    --- Diff: 
nifi-nar-bundles/nifi-standard-services/nifi-distributed-cache-client-service-api/src/main/java/org/apache/nifi/distributed/cache/client/AtomicDistributedMapCacheClient.java
 ---
    @@ -71,6 +73,23 @@
          * @return true only if the key is replaced.
          * @throws IOException if unable to communicate with the remote 
instance
          */
    +    @Deprecated
         <K, V> boolean replace(K key, V value, Serializer<K> keySerializer, 
Serializer<V> valueSerializer, long revision) throws IOException;
    --- End diff --
    
    @ijokarumawak I think using generics for the revision should work, I had 
actually considered this idea and not really sure why I didn't go this route, 
but I am open to giving it a try.
    
    We would also need to pass in a Serializer<R> revisionSerializer to the 
replace method right?
    
    So the process would be... fetch the existing CacheEntry, update the value 
(V), and pass it back in with the serializers.
    
    I'll give it a try in the next couple of days, thanks for taking a look!


> Implement a DistributedMapCacheClient backed by Redis
> -----------------------------------------------------
>
>                 Key: NIFI-4043
>                 URL: https://issues.apache.org/jira/browse/NIFI-4043
>             Project: Apache NiFi
>          Issue Type: Improvement
>            Reporter: Bryan Bende
>            Assignee: Bryan Bende
>            Priority: Minor
>
> We should provide other caching options besides the 
> DistributedMapCacheClient/DistributedMapCacheServer. 
> Redis is a popular caching solution and we could implement a 
> RedisDistributedMapCacheClient that would let us use all the existing 
> processors against Redis.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to