amitjoy commented on a change in pull request #29: URL: https://github.com/apache/felix-dev/pull/29#discussion_r447605485
########## File path: healthcheck/core/src/main/java/org/apache/felix/hc/core/impl/executor/async/cron/CronScheduler.java ########## @@ -0,0 +1,170 @@ +package org.apache.felix.hc.core.impl.executor.async.cron; + +import static java.util.concurrent.TimeUnit.SECONDS; + +import java.time.Duration; +import java.util.Collection; +import java.util.HashMap; +import java.util.Map; +import java.util.Map.Entry; +import java.util.concurrent.ExecutorService; +import java.util.concurrent.RejectedExecutionException; +import java.util.concurrent.TimeUnit; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public final class CronScheduler implements AutoCloseable { + + private final Logger logger = LoggerFactory.getLogger(getClass()); + + /** + * Object used for internal locking/notifications. + */ + private final Object monitor = new Object(); + + /** + * List of managed tasks. + */ + private final Map<String, CronSchedulerTask> tasks = new HashMap<>(); + + /** + * Task executor instance. + */ + public final ExecutorService tasksExecutor; + + /** + * Thread that makes all scheduling job. + */ + public final SchedulerThread schedulerThread; + + /** + * If scheduler is active or not. + */ + private boolean isActive; Review comment: Fixed ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org