sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From romb...@apache.org
Subject [sling-org-apache-sling-hc-annotations] 16/21: SLING-4417 allow to configure immediate flag in the healthcheck annotation and use that in some examples
Date Fri, 20 Oct 2017 14:38:30 GMT
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-hc-annotations.git

commit d6935fd89ee267d6e5e19f1bd40ace907fbd2826
Author: Konrad Windszus <kwin@apache.org>
AuthorDate: Thu Feb 25 08:31:55 2016 +0000

    SLING-4417 allow to configure immediate flag in the healthcheck annotation and use that
in some examples
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1732260 13f79535-47bb-0310-9956-ffa450edef68
---
 src/main/java/org/apache/sling/hc/annotations/SlingHealthCheck.java    | 3 +++
 .../org/apache/sling/hc/annotations/SlingHealthCheckProcessor.java     | 2 ++
 2 files changed, 5 insertions(+)

diff --git a/src/main/java/org/apache/sling/hc/annotations/SlingHealthCheck.java b/src/main/java/org/apache/sling/hc/annotations/SlingHealthCheck.java
index 9c7abd5..f5619f4 100644
--- a/src/main/java/org/apache/sling/hc/annotations/SlingHealthCheck.java
+++ b/src/main/java/org/apache/sling/hc/annotations/SlingHealthCheck.java
@@ -64,6 +64,9 @@ public @interface SlingHealthCheck {
      * file for this component. Otherwise no Metatype Service data is generated for this
component. */
     boolean metatype() default true;
 
+    /** Whether immediate is set on the SCR component.  */
+    boolean immediate() default false;
+
     /** Set the metatype factory pid property (only for non factory components). */
     boolean configurationFactory() default false;
 
diff --git a/src/main/java/org/apache/sling/hc/annotations/SlingHealthCheckProcessor.java
b/src/main/java/org/apache/sling/hc/annotations/SlingHealthCheckProcessor.java
index fe388ba..f9caaf4 100644
--- a/src/main/java/org/apache/sling/hc/annotations/SlingHealthCheckProcessor.java
+++ b/src/main/java/org/apache/sling/hc/annotations/SlingHealthCheckProcessor.java
@@ -54,6 +54,7 @@ public class SlingHealthCheckProcessor implements AnnotationProcessor {
 
         final boolean generateComponent = cad.getBooleanValue("generateComponent", true);
         final boolean metatype = cad.getBooleanValue("metatype", true);
+        final boolean immediate = cad.getBooleanValue("immediate", false);
 
         // generate ComponentDescription if required
         if (generateComponent) {
@@ -71,6 +72,7 @@ public class SlingHealthCheckProcessor implements AnnotationProcessor {
             cd.setDescription(cad.getStringValue("description", "Health Check Configuration"));
 
             cd.setCreateMetatype(metatype);
+            cd.setImmediate(immediate);
 
             classDescription.add(cd);
         }

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <commits@sling.apache.org>.

Mime
View raw message