exceptionfactory commented on a change in pull request #4852:
URL: https://github.com/apache/nifi/pull/4852#discussion_r584030215
##########
File path:
nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-components/src/main/java/org/apache/nifi/controller/repository/scheduling/ConnectableProcessContext.java
##########
@@ -41,18 +33,31 @@
import org.apache.nifi.scheduling.ExecutionNode;
import org.apache.nifi.util.Connectables;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Set;
+import java.util.concurrent.TimeUnit;
+import java.util.function.Supplier;
+
/**
* This class is essentially an empty shell for {@link Connectable}s that are
not Processors
*/
public class ConnectableProcessContext implements ProcessContext {
private final Connectable connectable;
- private final PropertyEncryptor encryptor;
+ private final Supplier<PropertyEncryptor> encryptorFactory;
Review comment:
One other option to consider instead of changing references for
`PropertyEncryptor` to `Supplier<PropertyEncryptor>` would be to create a
lazily initialized PropertyEncryptor specific to the stateless engine. This
implementation would take the sensitive properties key as a constructor
argument, but only call `PropertyEncryptorFactory` on initial calls to
`encrypt()` or `decrypt()`. Not a big difference either way, just fewer
classes impacted.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]