Package org.apache.nifi.reporting
Class AbstractReportingTask
java.lang.Object
org.apache.nifi.components.AbstractConfigurableComponent
org.apache.nifi.reporting.AbstractReportingTask
- All Implemented Interfaces:
ConfigurableComponent,ReportingTask
public abstract class AbstractReportingTask
extends AbstractConfigurableComponent
implements ReportingTask
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Stringprivate ComponentLogprivate Stringprivate NodeTypeProviderprivate longprivate ControllerServiceLookup -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected final ControllerServiceLookupprotected ComponentLogprotected StringgetName()protected final NodeTypeProviderprotected longgetSchedulingPeriod(TimeUnit timeUnit) protected voidinit(ReportingInitializationContext config) Provides a mechanism by which subclasses can perform initialization of the Reporting Task before it is scheduled to be runfinal voidProvides the Reporting Task with access to objects that may be of use throughout the life of the servicevoidsetComponentInfo(ConfigurationContext context) Sets various component information using the given contextMethods inherited from class org.apache.nifi.components.AbstractConfigurableComponent
customValidate, equals, getPropertyDescriptor, getPropertyDescriptors, getSupportedDynamicPropertyDescriptor, getSupportedPropertyDescriptors, hashCode, onPropertyModified, toString, validateMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.nifi.components.ConfigurableComponent
getPropertyDescriptor, getPropertyDescriptors, onPropertyModified, validateMethods inherited from interface org.apache.nifi.reporting.ReportingTask
isStateful, migrateProperties, onTrigger
-
Field Details
-
identifier
-
name
-
schedulingNanos
private long schedulingNanos -
serviceLookup
-
logger
-
nodeTypeProvider
-
-
Constructor Details
-
AbstractReportingTask
public AbstractReportingTask()
-
-
Method Details
-
initialize
Description copied from interface:ReportingTaskProvides the Reporting Task with access to objects that may be of use throughout the life of the service- Specified by:
initializein interfaceReportingTask- Parameters:
config- of initialization context- Throws:
InitializationException- if unable to init
-
getControllerServiceLookup
- Returns:
- the
ControllerServiceLookupthat was passed to theinitialize(ReportingInitializationContext)method
-
getNodeTypeProvider
- Returns:
- the
NodeTypeProviderthat was passed to theinitialize(ReportingInitializationContext)method
-
getIdentifier
- Specified by:
getIdentifierin interfaceConfigurableComponent- Returns:
- the identifier of this Reporting Task
-
getName
- Returns:
- the name of this Reporting Task
-
setComponentInfo
Sets various component information using the given context- Parameters:
context- the context to use for this reporting task
-
getSchedulingPeriod
- Parameters:
timeUnit- of scheduling period- Returns:
- the amount of times that elapses between the moment that this
ReportingTask finishes its invocation of
ReportingTask.onTrigger(ReportingContext)and the next time thatReportingTask.onTrigger(ReportingContext)is called.
-
init
Provides a mechanism by which subclasses can perform initialization of the Reporting Task before it is scheduled to be run- Parameters:
config- context- Throws:
InitializationException- if failure to init
-
getLogger
- Returns:
- the logger that has been provided to the component by the framework in its initialize method
-