Package org.apache.nifi.controller.flow
Class AbstractFlowManager
java.lang.Object
org.apache.nifi.controller.flow.AbstractFlowManager
- All Implemented Interfaces:
FlowManager,ParameterProviderLookup
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ConcurrentMap<String, Connection> private final ConcurrentMap<String, FlowAnalysisRuleNode> private final ConcurrentMap<String, FlowRegistryClientNode> private final ConcurrentMap<String, Funnel> private final ConcurrentMap<String, Port> private final ConcurrentMap<String, Port> private final ConcurrentMap<String, ParameterProviderNode> private final ConcurrentMap<String, ProcessGroup> private final ConcurrentMap<String, ProcessorNode> private final ConcurrentMap<String, ReportingTaskNode> private ControllerServiceProviderprivate FlowAnalyzerprivate final FlowFileEventRepositoryprivate final BooleanSupplierprivate final ParameterContextManagerprivate PythonBridgeprivate ProcessGroupprivate RuleViolationsManagerprivate final ThreadLocal<Boolean> Fields inherited from interface org.apache.nifi.controller.flow.FlowManager
DEFAULT_ROOT_GROUP_NAME, ROOT_GROUP_ID_ALIAS -
Constructor Summary
ConstructorsConstructorDescriptionAbstractFlowManager(FlowFileEventRepository flowFileEventRepository, ParameterContextManager parameterContextManager, BooleanSupplier flowInitializedCheck) -
Method Summary
Modifier and TypeMethodDescriptionbooleanareGroupsSame(String id1, String id2) createFlowAnalysisRule(String type, String id, BundleCoordinate bundleCoordinate, boolean firstTimeAdded) createParameterContext(String id, String name, String description, Map<String, Parameter> parameters, List<String> inheritedContextIds, ParameterProviderConfiguration parameterProviderConfiguration) createParameterProvider(String type, String id, BundleCoordinate bundleCoordinate, boolean firstTimeAdded) createProcessor(String type, String id, BundleCoordinate coordinate) createProcessor(String type, String id, BundleCoordinate coordinate, boolean firstTimeAdded) createReportingTask(String type, String id, BundleCoordinate bundleCoordinate, boolean firstTimeAdded) createReportingTask(String type, BundleCoordinate bundleCoordinate) createReportingTask(String type, BundleCoordinate bundleCoordinate, boolean firstTimeAdded) findAllProcessors(Predicate<ProcessorNode> filter) getConnection(String id) protected abstract ExtensionManagergetFlowAnalysisRuleNode(String taskId) getInputPort(String id) getOutputPort(String id) protected abstract Authorizableprotected abstract ProcessSchedulergetReportingTaskNode(String taskId) voidinitialize(ControllerServiceProvider controllerServiceProvider, PythonBridge pythonBridge, FlowAnalyzer flowAnalyzer, RuleViolationsManager ruleViolationsManager) protected booleanprivate ParameterContextLooks up a ParameterContext by ID.voidonConnectionAdded(Connection connection) voidonConnectionRemoved(Connection connection) protected voidonFlowAnalysisRuleAdded(FlowAnalysisRuleNode flowAnalysisRuleNode) voidonFlowRegistryClientAdded(FlowRegistryClientNode clientNode) voidonFlowRegistryClientRemoved(FlowRegistryClientNode clientNode) voidonFunnelAdded(Funnel funnel) voidonFunnelRemoved(Funnel funnel) voidonInputPortAdded(Port inputPort) voidonInputPortRemoved(Port inputPort) voidonOutputPortAdded(Port outputPort) voidonOutputPortRemoved(Port outputPort) voidonParameterProviderAdded(ParameterProviderNode parameterProviderNode) voidonProcessGroupAdded(ProcessGroup group) voidvoidonProcessorAdded(ProcessorNode procNode) voidonProcessorRemoved(ProcessorNode procNode) voidonReportingTaskAdded(ReportingTaskNode taskNode) voidpurge()voidremoveFlowAnalysisRule(FlowAnalysisRuleNode flowAnalysisRuleNode) voidremoveParameterProvider(ParameterProviderNode parameterProvider) voidremoveReportingTask(ReportingTaskNode reportingTaskNode) private voidremoveRuleViolationsForSubject(String identifier) voidsetRootGroup(ProcessGroup rootGroup) private voidvoidwithParameterContextResolution(Runnable parameterContextAction) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.nifi.controller.flow.FlowManager
addRootControllerService, createConnection, createControllerService, createFlowAnalysisRule, createFlowRegistryClient, createFunnel, createLabel, createLocalInputPort, createLocalOutputPort, createParameterProvider, createPrioritizer, createProcessGroup, createProcessor, createPublicInputPort, createPublicOutputPort, createRemoteProcessGroup, createReportingTask, getPublicInputPort, getPublicInputPorts, getPublicOutputPort, getPublicOutputPorts, getRootControllerService, getRootControllerServices, instantiateSnippet, removeFlowRegistryClient, removeRootControllerService
-
Field Details
-
allProcessGroups
-
allProcessors
-
allConnections
-
allInputPorts
-
allOutputPorts
-
allFunnels
-
allReportingTasks
-
allFlowAnalysisRules
-
allParameterProviders
-
allFlowRegistryClients
-
flowFileEventRepository
-
parameterContextManager
-
flowInitializedCheck
-
controllerServiceProvider
-
pythonBridge
-
flowAnalyzer
-
ruleViolationsManager
-
rootGroup
-
withParameterContextResolution
-
-
Constructor Details
-
AbstractFlowManager
public AbstractFlowManager(FlowFileEventRepository flowFileEventRepository, ParameterContextManager parameterContextManager, BooleanSupplier flowInitializedCheck)
-
-
Method Details
-
initialize
public void initialize(ControllerServiceProvider controllerServiceProvider, PythonBridge pythonBridge, FlowAnalyzer flowAnalyzer, RuleViolationsManager ruleViolationsManager) -
getGroup
- Specified by:
getGroupin interfaceFlowManager
-
onProcessGroupAdded
- Specified by:
onProcessGroupAddedin interfaceFlowManager
-
onProcessGroupRemoved
- Specified by:
onProcessGroupRemovedin interfaceFlowManager
-
onProcessorAdded
- Specified by:
onProcessorAddedin interfaceFlowManager
-
onProcessorRemoved
- Specified by:
onProcessorRemovedin interfaceFlowManager
-
findAllProcessors
- Specified by:
findAllProcessorsin interfaceFlowManager
-
findConnectable
- Specified by:
findConnectablein interfaceFlowManager
-
getProcessorNode
- Specified by:
getProcessorNodein interfaceFlowManager
-
onConnectionAdded
- Specified by:
onConnectionAddedin interfaceFlowManager
-
isFlowInitialized
protected boolean isFlowInitialized() -
onConnectionRemoved
- Specified by:
onConnectionRemovedin interfaceFlowManager
-
getConnection
- Specified by:
getConnectionin interfaceFlowManager
-
findAllConnections
- Specified by:
findAllConnectionsin interfaceFlowManager
-
setRootGroup
-
getRootGroup
- Specified by:
getRootGroupin interfaceFlowManager
-
getRootGroupId
- Specified by:
getRootGroupIdin interfaceFlowManager
-
areGroupsSame
- Specified by:
areGroupsSamein interfaceFlowManager
-
getComponentCounts
- Specified by:
getComponentCountsin interfaceFlowManager
-
purge
public void purge()- Specified by:
purgein interfaceFlowManager
-
verifyCanPurge
private void verifyCanPurge() -
getAllControllerServices
- Specified by:
getAllControllerServicesin interfaceFlowManager
-
getControllerServiceNode
- Specified by:
getControllerServiceNodein interfaceFlowManager
-
onInputPortAdded
- Specified by:
onInputPortAddedin interfaceFlowManager
-
onInputPortRemoved
- Specified by:
onInputPortRemovedin interfaceFlowManager
-
getInputPort
- Specified by:
getInputPortin interfaceFlowManager
-
onOutputPortAdded
- Specified by:
onOutputPortAddedin interfaceFlowManager
-
onOutputPortRemoved
- Specified by:
onOutputPortRemovedin interfaceFlowManager
-
getOutputPort
- Specified by:
getOutputPortin interfaceFlowManager
-
onFunnelAdded
- Specified by:
onFunnelAddedin interfaceFlowManager
-
onFunnelRemoved
- Specified by:
onFunnelRemovedin interfaceFlowManager
-
getFunnel
- Specified by:
getFunnelin interfaceFlowManager
-
createProcessor
- Specified by:
createProcessorin interfaceFlowManager
-
createProcessor
public ProcessorNode createProcessor(String type, String id, BundleCoordinate coordinate, boolean firstTimeAdded) - Specified by:
createProcessorin interfaceFlowManager
-
createReportingTask
- Specified by:
createReportingTaskin interfaceFlowManager
-
createReportingTask
public ReportingTaskNode createReportingTask(String type, BundleCoordinate bundleCoordinate, boolean firstTimeAdded) - Specified by:
createReportingTaskin interfaceFlowManager
-
createReportingTask
public ReportingTaskNode createReportingTask(String type, String id, BundleCoordinate bundleCoordinate, boolean firstTimeAdded) - Specified by:
createReportingTaskin interfaceFlowManager
-
getReportingTaskNode
- Specified by:
getReportingTaskNodein interfaceFlowManager
-
createParameterProvider
public ParameterProviderNode createParameterProvider(String type, String id, BundleCoordinate bundleCoordinate, boolean firstTimeAdded) - Specified by:
createParameterProviderin interfaceFlowManager
-
removeReportingTask
- Specified by:
removeReportingTaskin interfaceFlowManager
-
onReportingTaskAdded
-
createFlowAnalysisRule
public FlowAnalysisRuleNode createFlowAnalysisRule(String type, String id, BundleCoordinate bundleCoordinate, boolean firstTimeAdded) - Specified by:
createFlowAnalysisRulein interfaceFlowManager
-
getFlowAnalysisRuleNode
- Specified by:
getFlowAnalysisRuleNodein interfaceFlowManager
-
removeFlowAnalysisRule
- Specified by:
removeFlowAnalysisRulein interfaceFlowManager
-
getAllFlowAnalysisRules
- Specified by:
getAllFlowAnalysisRulesin interfaceFlowManager
-
onFlowAnalysisRuleAdded
-
getParameterProvider
- Specified by:
getParameterProviderin interfaceParameterProviderLookup
-
removeParameterProvider
- Specified by:
removeParameterProviderin interfaceFlowManager
-
getAllParameterProviders
- Specified by:
getAllParameterProvidersin interfaceFlowManager
-
onParameterProviderAdded
-
getExtensionManager
-
getProcessScheduler
-
getAllReportingTasks
- Specified by:
getAllReportingTasksin interfaceFlowManager
-
getFlowRegistryClient
- Specified by:
getFlowRegistryClientin interfaceFlowManager
-
getAllFlowRegistryClients
- Specified by:
getAllFlowRegistryClientsin interfaceFlowManager
-
onFlowRegistryClientAdded
-
onFlowRegistryClientRemoved
-
getParameterContextManager
- Specified by:
getParameterContextManagerin interfaceFlowManager
-
createParameterContext
public ParameterContext createParameterContext(String id, String name, String description, Map<String, Parameter> parameters, List<String> inheritedContextIds, ParameterProviderConfiguration parameterProviderConfiguration) - Specified by:
createParameterContextin interfaceFlowManager
-
withParameterContextResolution
- Specified by:
withParameterContextResolutionin interfaceFlowManager
-
lookupParameterContext
Looks up a ParameterContext by ID. If not found, registers a ReferenceOnlyParameterContext, preventing chicken-egg scenarios where a referenced ParameterContext is not registered before the referencing one.- Parameters:
id- A parameter context ID- Returns:
- The matching ParameterContext, or ReferenceOnlyParameterContext if not found yet
-
getParameterContextParent
-
getFlowAnalyzer
- Specified by:
getFlowAnalyzerin interfaceFlowManager
-
getRuleViolationsManager
- Specified by:
getRuleViolationsManagerin interfaceFlowManager
-
removeRuleViolationsForSubject
-