add getEntries() to CronSchedule

This commit is contained in:
Jörg Prante 2019-09-10 19:03:15 +02:00
parent eb0b999f4e
commit abcf465ada

View file

@ -40,6 +40,10 @@ public class CronSchedule<T> implements Closeable {
entries.removeIf(entry -> name.equals(entry.getName())); entries.removeIf(entry -> name.equals(entry.getName()));
} }
public List<Entry<T>> getEntries() {
return entries;
}
public void start() { public void start() {
long initialDelay = periodInMilliseconds - (Clock.systemDefaultZone().millis() % periodInMilliseconds); long initialDelay = periodInMilliseconds - (Clock.systemDefaultZone().millis() % periodInMilliseconds);
this.future = executor.scheduleAtFixedRate(CronSchedule.this::run, this.future = executor.scheduleAtFixedRate(CronSchedule.this::run,