ionutzpi commented on code in PR #43: URL: https://github.com/apache/sling-org-apache-sling-event/pull/43#discussion_r2081780078
########## src/main/java/org/apache/sling/event/impl/jobs/config/JobManagerConfiguration.java: ########## @@ -199,6 +202,34 @@ static JobManagerConfiguration newForTest(ResourceResolverFactory resourceResolv /** The topology capabilities. */ private volatile TopologyCapabilities topologyCapabilities; + /** The condition that determines if the job manager is enabled. */ + @Reference( + target = "(osgi.condition.id=true)", + cardinality = ReferenceCardinality.OPTIONAL, + policy = ReferencePolicy.DYNAMIC + ) + private volatile Condition condition; + + /** + * Get the condition that determines if the job manager is enabled. + * @return The condition or null if the job manager is disabled + */ + public boolean isEnable() { + return condition != null; + } + + /** + * Notify all queues about condition change + */ + private void notifyConditionChange() { + synchronized ( this.listeners ) { + final TopologyCapabilities topologyCapabilities = this.topologyCapabilities; + for(final ConfigurationChangeListener listener : this.listeners) { + listener.configurationChanged(topologyCapabilities != null && condition != null); + } + } Review Comment: Removed. -- 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