public class StandardControllerServiceNode extends AbstractComponentNode implements ControllerServiceNode
| Modifier and Type | Field and Description |
|---|---|
private AtomicBoolean |
active |
private String |
comment |
private AtomicReference<ControllerServiceDetails> |
controllerServiceHolder |
private static org.slf4j.Logger |
LOG |
private ProcessGroup |
processGroup |
private Lock |
readLock |
private Set<Tuple<ComponentNode,PropertyDescriptor>> |
referencingComponents |
private ReadWriteLock |
rwLock |
private ControllerServiceProvider |
serviceProvider |
private ServiceStateTransition |
stateTransition |
private AtomicReference<String> |
versionedComponentId |
private Lock |
writeLock |
computeValidationErrors, equals, getAdditionalClasspathResources, getAnnotationData, getCanonicalClassName, getComponentType, getEffectivePropertyValue, getEffectivePropertyValues, getExtensionManager, getIdentifier, getName, getProperties, getProperty, getPropertyDescriptor, getPropertyDescriptors, getRawPropertyValue, getRawPropertyValues, getReferencedParameterNames, getReloadComponent, getValidationContext, getValidationContextFactory, getValidationErrors, getValidationErrors, getValidationState, getValidationStatus, getValidationStatus, getVariableRegistry, hashCode, isExtensionMissing, isReferencingParameter, onParametersModified, onPropertyModified, pauseValidationTrigger, performValidation, performValidation, performValidation, refreshProperties, reloadAdditionalResourcesIfNecessary, resetValidationState, resumeValidationTrigger, setAdditionalResourcesFingerprint, setAnnotationData, setExtensionMissing, setName, setProperties, validateReferencedControllerServices, verifyCanUpdateBundle, verifyCanUpdatePropertiesclone, finalize, getClass, notify, notifyAll, wait, wait, waitauthorize, checkAuthorization, getAdditionalClasspathResources, getAnnotationData, getCanonicalClassName, getComponentType, getEffectivePropertyValue, getEffectivePropertyValues, getIdentifier, getName, getProperties, getProperty, getPropertyDescriptor, getPropertyDescriptors, getRawPropertyValue, getRawPropertyValues, getReferencedParameterNames, getValidationErrors, getValidationStatus, getValidationStatus, getVariableRegistry, isExtensionMissing, isReferencingParameter, onParametersModified, pauseValidationTrigger, performValidation, performValidation, performValidation, refreshProperties, reloadAdditionalResourcesIfNecessary, resetValidationState, resumeValidationTrigger, setAnnotationData, setExtensionMissing, setName, setProperties, setProperties, verifyCanUpdateBundle, verifyCanUpdatePropertiesauthorize, checkAuthorization, getRequestedResource, isAuthorizedprivate static final org.slf4j.Logger LOG
private final AtomicReference<ControllerServiceDetails> controllerServiceHolder
private final ControllerServiceProvider serviceProvider
private final ServiceStateTransition stateTransition
private final AtomicReference<String> versionedComponentId
private final ReadWriteLock rwLock
private final Lock readLock
private final Lock writeLock
private final Set<Tuple<ComponentNode,PropertyDescriptor>> referencingComponents
private volatile String comment
private volatile ProcessGroup processGroup
private final AtomicBoolean active
public StandardControllerServiceNode(LoggableComponent<ControllerService> implementation, LoggableComponent<ControllerService> proxiedControllerService, ControllerServiceInvocationHandler invocationHandler, String id, ValidationContextFactory validationContextFactory, ControllerServiceProvider serviceProvider, ComponentVariableRegistry variableRegistry, ReloadComponent reloadComponent, ExtensionManager extensionManager, ValidationTrigger validationTrigger)
public StandardControllerServiceNode(LoggableComponent<ControllerService> implementation, LoggableComponent<ControllerService> proxiedControllerService, ControllerServiceInvocationHandler invocationHandler, String id, ValidationContextFactory validationContextFactory, ControllerServiceProvider serviceProvider, String componentType, String componentCanonicalClass, ComponentVariableRegistry variableRegistry, ReloadComponent reloadComponent, ExtensionManager extensionManager, ValidationTrigger validationTrigger, boolean isExtensionMissing)
public ConfigurableComponent getComponent()
getComponent in interface ComponentNodepublic TerminationAwareLogger getLogger()
getLogger in interface ComponentNodepublic BundleCoordinate getBundleCoordinate()
getBundleCoordinate in interface ComponentNodepublic Authorizable getParentAuthorizable()
getParentAuthorizable in interface Authorizablepublic Resource getResource()
getResource in interface Authorizablepublic boolean isRestricted()
isRestricted in interface ComponentNodepublic Class<?> getComponentClass()
getComponentClass in interface ComponentNodepublic boolean isDeprecated()
isDeprecated in interface ComponentNodepublic ControllerService getControllerServiceImplementation()
getControllerServiceImplementation in interface ControllerServiceNodepublic ControllerService getProxiedControllerService()
getProxiedControllerService in interface ControllerServiceNodepublic ControllerServiceInvocationHandler getInvocationHandler()
getInvocationHandler in interface ControllerServiceNodepublic void setControllerServiceAndProxy(LoggableComponent<ControllerService> implementation, LoggableComponent<ControllerService> proxiedControllerService, ControllerServiceInvocationHandler invocationHandler)
setControllerServiceAndProxy in interface ControllerServiceNodepublic void reload(Set<URL> additionalUrls) throws ControllerServiceInstantiationException
reload in interface ComponentNodeControllerServiceInstantiationExceptionpublic ProcessGroup getProcessGroup()
getProcessGroup in interface ControllerServiceNodepublic void setProcessGroup(ProcessGroup group)
setProcessGroup in interface ControllerServiceNodepublic ControllerServiceReference getReferences()
getReferences in interface ControllerServiceNodepublic void addReference(ComponentNode referencingComponent, PropertyDescriptor propertyDescriptor)
addReference in interface ControllerServiceNodeprotected ParameterContext getParameterContext()
getParameterContext in class AbstractComponentNodepublic List<ControllerServiceNode> getRequiredControllerServices()
getRequiredControllerServices in interface ControllerServiceNodepublic void removeReference(ComponentNode referencingComponent, PropertyDescriptor propertyDescriptor)
removeReference in interface ControllerServiceNodepublic void verifyModifiable()
throws IllegalStateException
verifyModifiable in class AbstractComponentNodeIllegalStateExceptionpublic void verifyCanDelete()
verifyCanDelete in interface ControllerServiceNodepublic void verifyCanDisable()
verifyCanDisable in interface ControllerServiceNodepublic void verifyCanDisable(Set<ControllerServiceNode> ignoreReferences)
verifyCanDisable in interface ControllerServiceNodepublic void verifyCanEnable()
verifyCanEnable in interface ControllerServiceNodepublic void verifyCanEnable(Set<ControllerServiceNode> ignoredReferences)
verifyCanEnable in interface ControllerServiceNodepublic void verifyCanUpdate()
verifyCanUpdate in interface ControllerServiceNodepublic void verifyCanClearState()
verifyCanClearState in interface ControllerServiceNodepublic String getComments()
getComments in interface ControllerServiceNodepublic void setComments(String comment)
setComments in interface ControllerServiceNodepublic ControllerServiceState getState()
getState in interface ControllerServiceNodepublic boolean isActive()
isActive in interface ControllerServiceNodepublic boolean isValidationNecessary()
isValidationNecessary in interface ComponentNodepublic CompletableFuture<Void> enable(ScheduledExecutorService scheduler, long administrativeYieldMillis)
stateTransition to transition this service
from DISABLED to ENABLING state. If such transition succeeds the service
will be marked as 'active' (see ControllerServiceNode.isActive()).
If such transition doesn't succeed then no enabling logic will be
performed and the method will exit. In other words it is safe to invoke
this operation multiple times and from multiple threads.
enable in interface ControllerServiceNodeprivate void validateReferences()
public CompletableFuture<Void> disable(ScheduledExecutorService scheduler)
stateTransition to transition this service
from ENABLED to DISABLING state. If such transition succeeds the service
will be de-activated (see ControllerServiceNode.isActive()).
If such transition doesn't succeed (the service is still in ENABLING state)
then the service will still be transitioned to DISABLING state to ensure that
no other transition could happen on this service. However in such event
(e.g., its @OnEnabled finally succeeded), the enable(ScheduledExecutorService, long)
operation will initiate service disabling javadoc for (see enable(ScheduledExecutorService, long)
disable in interface ControllerServiceNodeprivate void invokeDisable(ConfigurationContext configContext)
public String getProcessGroupIdentifier()
getProcessGroupIdentifier in interface ComponentAuthorizablepublic Optional<String> getVersionedComponentId()
getVersionedComponentId in interface VersionedComponentpublic void setVersionedComponentId(String versionedComponentId)
setVersionedComponentId in interface VersionedComponentpublic String toString()
toString in class AbstractComponentNodepublic ParameterLookup getParameterLookup()
getParameterLookup in interface ComponentNodeCopyright © 2021 Apache NiFi Project. All rights reserved.