Class StandardControllerServiceProvider
java.lang.Object
org.apache.nifi.controller.service.StandardControllerServiceProvider
- All Implemented Interfaces:
ControllerServiceLookup,ControllerServiceProvider
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final BulletinRepositoryprivate final ExtensionManagerprivate final FlowManagerprivate static final org.slf4j.Loggerprivate final ProcessSchedulerprivate final ConcurrentMap<String, ControllerServiceNode> -
Constructor Summary
ConstructorsConstructorDescriptionStandardControllerServiceProvider(ProcessScheduler scheduler, BulletinRepository bulletinRepo, FlowManager flowManager, ExtensionManager extensionManager) -
Method Summary
Modifier and TypeMethodDescription(package private) static List<List<ControllerServiceNode>> determineEnablingOrder(Map<String, ControllerServiceNode> serviceNodeMap) private static voiddetermineEnablingOrder(Map<String, ControllerServiceNode> serviceNodeMap, ControllerServiceNode contextNode, List<ControllerServiceNode> orderedNodes, Set<ControllerServiceNode> visited) disableControllerService(ControllerServiceNode serviceNode) private voiddisableControllerServiceAndReferencingServices(ControllerServiceNode serviceNode, BooleanSupplier cancelSupplier) private voiddisableControllerServices(Collection<ControllerServiceNode> serviceNodes, CompletableFuture<Void> future) disableControllerServicesAsync(Collection<ControllerServiceNode> serviceNodes) disableReferencingServices(ControllerServiceNode serviceNode) enableControllerService(ControllerServiceNode serviceNode) voidenableControllerServices(Collection<ControllerServiceNode> serviceNodesIn) private voidenableControllerServices(Collection<ControllerServiceNode> serviceNodes, CompletableFuture<Void> completableFuture) enableControllerServicesAsync(Collection<ControllerServiceNode> serviceNodes) enableReferencingServices(ControllerServiceNode serviceNode) private Set<ComponentNode> enableReferencingServices(ControllerServiceNode serviceNode, List<ControllerServiceNode> recursiveReferences) getControllerService(String serviceIdentifier) getControllerServiceForComponent(String serviceIdentifier, String componentId) getControllerServiceIdentifiers(Class<? extends ControllerService> serviceType) getControllerServiceIdentifiers(Class<? extends ControllerService> serviceType, String groupId) getControllerServiceName(String serviceIdentifier) getControllerServiceNode(String serviceIdentifier) Class<? extends ControllerService> getControllerServiceType(String serviceTypeName) private ProcessGroupprivate Class<? extends ControllerService> getServiceInterfaceByName(Class<?> serviceClass, String type) booleanisControllerServiceEnabled(String serviceIdentifier) booleanbooleanisControllerServiceEnabling(String serviceIdentifier) voidonControllerServiceAdded(ControllerServiceNode serviceNode) voidremoveControllerService(ControllerServiceNode serviceNode) private Collection<ControllerServiceNode> scheduleReferencingComponents(ControllerServiceNode serviceNode) scheduleReferencingComponents(ControllerServiceNode serviceNode, Set<ComponentNode> candidates, ComponentScheduler componentScheduler) unscheduleReferencingComponents(ControllerServiceNode serviceNode) voidverifyCanDisableReferencingServices(ControllerServiceNode serviceNode) voidverifyCanEnableReferencingServices(ControllerServiceNode serviceNode) voidvoidverifyCanStopReferencingComponents(ControllerServiceNode serviceNode)
-
Field Details
-
logger
private static final org.slf4j.Logger logger -
processScheduler
-
bulletinRepo
-
flowManager
-
extensionManager
-
serviceCache
-
-
Constructor Details
-
StandardControllerServiceProvider
public StandardControllerServiceProvider(ProcessScheduler scheduler, BulletinRepository bulletinRepo, FlowManager flowManager, ExtensionManager extensionManager)
-
-
Method Details
-
onControllerServiceAdded
- Specified by:
onControllerServiceAddedin interfaceControllerServiceProvider
-
disableReferencingServices
- Specified by:
disableReferencingServicesin interfaceControllerServiceProvider
-
scheduleReferencingComponents
- Specified by:
scheduleReferencingComponentsin interfaceControllerServiceProvider
-
scheduleReferencingComponents
public Set<ComponentNode> scheduleReferencingComponents(ControllerServiceNode serviceNode, Set<ComponentNode> candidates, ComponentScheduler componentScheduler) - Specified by:
scheduleReferencingComponentsin interfaceControllerServiceProvider
-
unscheduleReferencingComponents
public Map<ComponentNode,Future<Void>> unscheduleReferencingComponents(ControllerServiceNode serviceNode) - Specified by:
unscheduleReferencingComponentsin interfaceControllerServiceProvider
-
enableControllerService
- Specified by:
enableControllerServicein interfaceControllerServiceProvider
-
enableControllerServices
- Specified by:
enableControllerServicesin interfaceControllerServiceProvider
-
enableControllerServicesAsync
- Specified by:
enableControllerServicesAsyncin interfaceControllerServiceProvider
-
enableControllerServices
private void enableControllerServices(Collection<ControllerServiceNode> serviceNodes, CompletableFuture<Void> completableFuture) throws Exception - Throws:
Exception
-
enableControllerServiceAndDependencies
- Specified by:
enableControllerServiceAndDependenciesin interfaceControllerServiceProvider
-
determineEnablingOrder
static List<List<ControllerServiceNode>> determineEnablingOrder(Map<String, ControllerServiceNode> serviceNodeMap) -
determineEnablingOrder
private static void determineEnablingOrder(Map<String, ControllerServiceNode> serviceNodeMap, ControllerServiceNode contextNode, List<ControllerServiceNode> orderedNodes, Set<ControllerServiceNode> visited) -
disableControllerService
- Specified by:
disableControllerServicein interfaceControllerServiceProvider
-
disableControllerServicesAsync
public CompletableFuture<Void> disableControllerServicesAsync(Collection<ControllerServiceNode> serviceNodes) - Specified by:
disableControllerServicesAsyncin interfaceControllerServiceProvider
-
disableControllerServices
private void disableControllerServices(Collection<ControllerServiceNode> serviceNodes, CompletableFuture<Void> future) throws Exception - Throws:
Exception
-
disableControllerServiceAndReferencingServices
private void disableControllerServiceAndReferencingServices(ControllerServiceNode serviceNode, BooleanSupplier cancelSupplier) throws ExecutionException, InterruptedException -
getControllerService
- Specified by:
getControllerServicein interfaceControllerServiceLookup
-
getRootGroup
-
getControllerServiceForComponent
public ControllerService getControllerServiceForComponent(String serviceIdentifier, String componentId) - Specified by:
getControllerServiceForComponentin interfaceControllerServiceProvider
-
isControllerServiceEnabled
- Specified by:
isControllerServiceEnabledin interfaceControllerServiceLookup
-
isControllerServiceEnabled
- Specified by:
isControllerServiceEnabledin interfaceControllerServiceLookup
-
isControllerServiceEnabling
- Specified by:
isControllerServiceEnablingin interfaceControllerServiceLookup
-
getControllerServiceNode
- Specified by:
getControllerServiceNodein interfaceControllerServiceProvider
-
getControllerServiceIdentifiers
public Set<String> getControllerServiceIdentifiers(Class<? extends ControllerService> serviceType, String groupId) - Specified by:
getControllerServiceIdentifiersin interfaceControllerServiceProvider
-
getControllerServiceType
- Specified by:
getControllerServiceTypein interfaceControllerServiceProvider
-
getServiceInterfaceByName
private Class<? extends ControllerService> getServiceInterfaceByName(Class<?> serviceClass, String type) -
getControllerServiceName
- Specified by:
getControllerServiceNamein interfaceControllerServiceLookup
-
removeControllerService
- Specified by:
removeControllerServicein interfaceControllerServiceProvider
-
getNonRootControllerServices
- Specified by:
getNonRootControllerServicesin interfaceControllerServiceProvider
-
enableReferencingServices
- Specified by:
enableReferencingServicesin interfaceControllerServiceProvider
-
enableReferencingServices
private Set<ComponentNode> enableReferencingServices(ControllerServiceNode serviceNode, List<ControllerServiceNode> recursiveReferences) -
verifyCanEnableReferencingServices
- Specified by:
verifyCanEnableReferencingServicesin interfaceControllerServiceProvider
-
verifyCanScheduleReferencingComponents
- Specified by:
verifyCanScheduleReferencingComponentsin interfaceControllerServiceProvider
-
verifyCanDisableReferencingServices
- Specified by:
verifyCanDisableReferencingServicesin interfaceControllerServiceProvider
-
verifyCanStopReferencingComponents
- Specified by:
verifyCanStopReferencingComponentsin interfaceControllerServiceProvider
-
getControllerServiceIdentifiers
public Set<String> getControllerServiceIdentifiers(Class<? extends ControllerService> serviceType) throws IllegalArgumentException - Specified by:
getControllerServiceIdentifiersin interfaceControllerServiceLookup- Throws:
IllegalArgumentException
-
getExtensionManager
- Specified by:
getExtensionManagerin interfaceControllerServiceProvider
-