You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nifi.apache.org by ma...@apache.org on 2015/01/22 18:04:42 UTC
[53/79] [abbrv] incubator-nifi git commit: NIFI-4: Updated
documentation for annotations
NIFI-4: Updated documentation for annotations
Project: http://git-wip-us.apache.org/repos/asf/incubator-nifi/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-nifi/commit/b942daa6
Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/b942daa6
Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/b942daa6
Branch: refs/heads/annotations
Commit: b942daa65ae4e2991d43a087fbcdde5057fbd463
Parents: 1a402d4
Author: Mark Payne <ma...@hotmail.com>
Authored: Thu Jan 22 09:07:51 2015 -0500
Committer: Mark Payne <ma...@hotmail.com>
Committed: Thu Jan 22 09:07:51 2015 -0500
----------------------------------------------------------------------
.../java/org/apache/nifi/annotation/lifecycle/OnEnabled.java | 7 ++++++-
.../org/apache/nifi/annotation/lifecycle/OnScheduled.java | 6 +++++-
2 files changed, 11 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/b942daa6/nifi/nifi-api/src/main/java/org/apache/nifi/annotation/lifecycle/OnEnabled.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-api/src/main/java/org/apache/nifi/annotation/lifecycle/OnEnabled.java b/nifi/nifi-api/src/main/java/org/apache/nifi/annotation/lifecycle/OnEnabled.java
index 8d7d6b3..1536dec 100644
--- a/nifi/nifi-api/src/main/java/org/apache/nifi/annotation/lifecycle/OnEnabled.java
+++ b/nifi/nifi-api/src/main/java/org/apache/nifi/annotation/lifecycle/OnEnabled.java
@@ -24,10 +24,15 @@ import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
+ * <p>
* Marker annotation a {@link org.apache.nifi.processor.Processor Processor},
* {@link org.apache.nifi.controller.ControllerService ControllerService} or
* {@link org.apache.nifi.reporting.ReportingTask ReportingTask}
- * can use to indicate a method should be called whenever the component is enabled.
+ * can use to indicate a method should be called whenever the component is enabled.
+ * Any method that has this annotation will be called every time a user enables the component.
+ * Additionally, each time that NiFi is restarted, if NiFi is configured to "auto-resume state"
+ * and the component is enabled (whether stopped or running), the method will be invoked.
+ * </p>
*
* <p>
* Methods using this annotation must take either 0 arguments or a single argument.
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/b942daa6/nifi/nifi-api/src/main/java/org/apache/nifi/annotation/lifecycle/OnScheduled.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-api/src/main/java/org/apache/nifi/annotation/lifecycle/OnScheduled.java b/nifi/nifi-api/src/main/java/org/apache/nifi/annotation/lifecycle/OnScheduled.java
index a0703fa..c012bd7 100644
--- a/nifi/nifi-api/src/main/java/org/apache/nifi/annotation/lifecycle/OnScheduled.java
+++ b/nifi/nifi-api/src/main/java/org/apache/nifi/annotation/lifecycle/OnScheduled.java
@@ -24,11 +24,15 @@ import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
+ * <p>
* Marker annotation a {@link org.apache.nifi.processor.Processor Processor} or
* {@link org.apache.nifi.reporting.ReportingTask ReportingTask} implementation
* can use to indicate a method should be called whenever the component is scheduled
* to run. This will be called before any call to 'onTrigger' and will be called once each time
- * a Processor or Reporting Task is scheduled to run.
+ * a Processor or Reporting Task is scheduled to run. This occurs in one of two ways: either
+ * a user clicks to schedule the component to run, or NiFi is restarted with the "auto-resume state"
+ * configuration set to true (the default value) and the component is already running.
+ * </p>
*
* <p>
* Methods using this annotation must take either 0 arguments or a single argument.