ionutzpi commented on code in PR #43:
URL: 
https://github.com/apache/sling-org-apache-sling-event/pull/43#discussion_r2086090864


##########
src/main/java/org/apache/sling/event/impl/jobs/config/JobManagerConfiguration.java:
##########
@@ -199,6 +202,50 @@ static JobManagerConfiguration 
newForTest(ResourceResolverFactory resourceResolv
     /** The topology capabilities. */
     private volatile TopologyCapabilities topologyCapabilities;
 
+    /** The condition that determines if job processing is enabled. */
+    @Reference(
+        target = 
"(osgi.condition.id=org.apache.sling.event.jobs.processing.enabled)",
+        cardinality = ReferenceCardinality.OPTIONAL,
+        policy = ReferencePolicy.DYNAMIC,
+        policyOption = ReferencePolicyOption.GREEDY
+    )
+    private volatile Condition jobProcessingEnabledCondition;

Review Comment:
   The @Reference annotation on the field with policy = ReferencePolicy.DYNAMIC 
and policyOption = ReferencePolicyOption.GREEDY will automatically call the 
corresponding bindJobProcessingEnabledCondition and 
unbindJobProcessingEnabledCondition methods if they are named according to the 
convention (bind<fieldName>/unbind<fieldName>)



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@sling.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to