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

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

Github user mosermw commented on the issue:

    https://github.com/apache/nifi/pull/2284
  
    Thank you Joe and Koji for taking a look at this.  I struggled with 
deciding whether to provide a default UnsupportedOperationException or to 
provide the new methods in the various DistributedMapCacheClient 
implementations.  I will happily change this PR to go with the 
UnsupportedOperationException route.  Give me a little time to make the changes 
and force push, but it should be a much smaller PR and easier to review.
    
    I agree that a keySet method could become problematic in a distributed Map 
environment.  However I believe it's important to provide as much of the Java 
Map interface in the distributed Map as we can, and let the implementer beware 
of the potential problems.  I do know some folks who have extended 
DistributedMapCacheClient with their own implementations, and I would like the 
keySet method to exist to support them.


> SimpleMapCache/PersistentMapCache: Add removeAndGet and removeByPatternAndGet
> -----------------------------------------------------------------------------
>
>                 Key: NIFI-4504
>                 URL: https://issues.apache.org/jira/browse/NIFI-4504
>             Project: Apache NiFi
>          Issue Type: Improvement
>    Affects Versions: 1.4.0
>            Reporter: Jon Kessler
>            Assignee: Michael Moser
>            Priority: Minor
>
> Typical map implementations return the value that was removed when performing 
> a remove. Because you couldn't update the existing remove methods without it 
> being a breaking change I suggest adding new versions of the remove and 
> removeByPattern methods that return the removed value(s).
> These changes should also be applied up the chain to any class that makes use 
> of these classes such as the MapCacheServer and 
> AtomicDistributedMapCacheClient.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to