stefan-egli commented on a change in pull request #16:
URL:
https://github.com/apache/sling-org-apache-sling-event/pull/16#discussion_r800775577
##########
File path:
src/main/java/org/apache/sling/event/impl/jobs/scheduling/JobSchedulerImpl.java
##########
@@ -455,6 +455,14 @@ private boolean match(final ScheduledJobInfoImpl job,
final Map<String, Object>
}
return jobs;
}
+
+ /**
+ * Provide the total number of jobs registered in the system, irrespective
of topics
+ * @return the total number of scheduled jobs
+ */
+ public int getTotalNumberOfScheduledJobs() {
+ return this.scheduledJobs.size();
Review comment:
good point, it's a bit of overly cautious to make it synchronous indeed
.. oh well, iiuc this is mostly not synchronized unless a new schedule is added
or removed. so it should indeed not impact noticeably
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]