markap14 opened a new pull request, #112:
URL: https://github.com/apache/nifi-api/pull/112

   <!-- SPDX-License-Identifier: Apache-2.0 -->
   
   # Summary
   
   [NIFI-16493](https://issues.apache.org/jira/browse/NIFI-16493)
   
   Implements the API portion of 
[NIP-50](https://issues.apache.org/jira/browse/NIP-50) by adding 
`patchState(Map<String, String> updatedState, Scope scope)` to `StateManager` 
and `ProcessSession`. A key with a non-null value is created or overwritten, a 
key mapped to `null` is removed, and keys not in the map are left unchanged. An 
empty map does nothing and a `null` map is rejected.
   
   - `StateManager.patchState` has a default implementation that retrieves the 
current state, applies the changes, and calls `replace` until it succeeds.
   - `ProcessSession.patchState` has no default implementation, so that every 
session implementation passes the patch through to the framework instead of 
quietly turning it into a whole-map replacement. `ProcessSession` 
implementations outside of NiFi will need to add this method.
   - `NopStateManager` overrides the method, since its `getState` returns 
`null`.
   
   The framework changes are tracked in 
[NIFI-16494](https://issues.apache.org/jira/browse/NIFI-16494).
   
   # Tracking
   
   Please complete the following tracking steps prior to pull request creation.
   
   ### Issue Tracking
   
   - [x] [Apache NiFi Jira](https://issues.apache.org/jira/browse/NIFI) issue 
created
   
   ### Pull Request Tracking
   
   - [x] Pull Request title starts with Apache NiFi Jira issue number, such as 
`NIFI-00000`
   - [x] Pull Request commit message starts with Apache NiFi Jira issue number, 
as such `NIFI-00000`
   
   ### Pull Request Formatting
   
   - [x] Pull Request based on current revision of the `main` branch
   - [x] Pull Request refers to a feature branch with one commit containing 
changes
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to