Matt Burgess created NIFI-3627:
----------------------------------

             Summary: Add ability to remove distributed map cache entries 
according to a regular expression
                 Key: NIFI-3627
                 URL: https://issues.apache.org/jira/browse/NIFI-3627
             Project: Apache NiFi
          Issue Type: Improvement
            Reporter: Matt Burgess


The DistributedMapCacheClient interface has the ability to remove an individual 
entry based on a specified key. For large numbers of key/value pairs, this 
becomes unwieldy as a processor using this would have to keep track of all the 
keys it has stored, thereby lessening the effectiveness of the cache.

Alternatively, I propose a method be added that will remove keys based on a 
regular expression (regex) pattern; this way a processor could prefix a value 
to each key (such as the UUID of the processor itself), and remove all such 
keys when it deems prudent.  The method could be as simple as:

void remove(String pattern)

or perhaps it could return boolean (true if any key was deleted, false 
otherwise) or an int (the number of deleted keys)

Note that in order to match the pattern, the key Serializer used must generate 
keys that the regex can match.



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

Reply via email to