From d876adaba7fb1be6f5815329b4f449422f91eac7 Mon Sep 17 00:00:00 2001 From: Daniel Hornung <d.hornung@indiscale.com> Date: Tue, 8 Jun 2021 10:23:48 +0200 Subject: [PATCH] DOC: More documentation. --- README_SETUP.md | 7 ++++--- src/main/java/org/caosdb/server/jobs/JobAnnotation.java | 7 ++++++- src/main/java/org/caosdb/server/jobs/Schedule.java | 8 +++++++- 3 files changed, 17 insertions(+), 5 deletions(-) diff --git a/README_SETUP.md b/README_SETUP.md index 64e613dd..37d3e478 100644 --- a/README_SETUP.md +++ b/README_SETUP.md @@ -197,10 +197,11 @@ Stand-alone documentation is built using Sphinx: `make doc` ### Requirements ## +- plantuml +- recommonmark - sphinx -* sphinx-rtd-theme -* sphinxcontrib-plantuml -* recommonmark +- sphinx-rtd-theme +- sphinxcontrib-plantuml - javasphinx :: `pip3 install --user javasphinx` - Alternative, if javasphinx fails because python3-sphinx is too recent: (`l_` not found): diff --git a/src/main/java/org/caosdb/server/jobs/JobAnnotation.java b/src/main/java/org/caosdb/server/jobs/JobAnnotation.java index b1493f13..8acdaccb 100644 --- a/src/main/java/org/caosdb/server/jobs/JobAnnotation.java +++ b/src/main/java/org/caosdb/server/jobs/JobAnnotation.java @@ -26,7 +26,12 @@ import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import org.caosdb.server.transaction.TransactionInterface; -/** Jobs may be annotated with @JobAnnotation(...). */ +/** + * Jobs may be annotated with @JobAnnotation(...). + * + * <p>Without a JobAnnotation, the Job will run at the default {@link + * org.caosdb.server.transaction.Transaction#check() CHECK} stage. + */ @Retention(RetentionPolicy.RUNTIME) public @interface JobAnnotation { JobExecutionTime time() default JobExecutionTime.CHECK; diff --git a/src/main/java/org/caosdb/server/jobs/Schedule.java b/src/main/java/org/caosdb/server/jobs/Schedule.java index 58630648..892f590f 100644 --- a/src/main/java/org/caosdb/server/jobs/Schedule.java +++ b/src/main/java/org/caosdb/server/jobs/Schedule.java @@ -30,7 +30,13 @@ import java.util.Map; import java.util.concurrent.CopyOnWriteArrayList; import org.caosdb.server.entity.EntityInterface; -/** Keeps track of Jobs, ordered by "time". */ +/** + * Keeps track of Jobs. + * + * <p>The Schedule class orders jobs by "time" and also assures that jobs are skipped when + * appropriate and to prevent that jobs run more than once (because sometimes they trigger each + * other). + */ public class Schedule { private final Map<Integer, List<ScheduledJob>> jobLists = new HashMap<>(); -- GitLab