annotate artifacts/src/main/java/org/dive4elements/river/wsplgen/Scheduler.java @ 6611:dfdeed3e997e

Shorten and correct waterlevel not in gauge string
author Andre Heinecke <aheinecke@intevation.de>
date Thu, 18 Jul 2013 17:54:44 +0200
parents af13ceeba52a
children e4606eae8ea5
rev   line source
5863
4897a58c8746 River artifacts: Added new copyright headers.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5838
diff changeset
1 /* Copyright (C) 2011, 2012, 2013 by Bundesanstalt für Gewässerkunde
4897a58c8746 River artifacts: Added new copyright headers.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5838
diff changeset
2 * Software engineering by Intevation GmbH
4897a58c8746 River artifacts: Added new copyright headers.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5838
diff changeset
3 *
5994
af13ceeba52a Removed trailing whitespace.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5863
diff changeset
4 * This file is Free Software under the GNU AGPL (>=v3)
5863
4897a58c8746 River artifacts: Added new copyright headers.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5838
diff changeset
5 * and comes with ABSOLUTELY NO WARRANTY! Check out the
5994
af13ceeba52a Removed trailing whitespace.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5863
diff changeset
6 * documentation coming with Dive4Elements River for details.
5863
4897a58c8746 River artifacts: Added new copyright headers.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5838
diff changeset
7 */
4897a58c8746 River artifacts: Added new copyright headers.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5838
diff changeset
8
5831
bd047b71ab37 Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents: 3302
diff changeset
9 package org.dive4elements.river.wsplgen;
1127
6b9877a9f6c1 Added infrastructure to start WSPLGEN calculations - the FloodMapState already start such calculations.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
10
1970
368040e5c400 Improved the Scheduler to be able to cancel running WSPLGEN jobs.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1127
diff changeset
11 import java.util.HashMap;
368040e5c400 Improved the Scheduler to be able to cancel running WSPLGEN jobs.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1127
diff changeset
12 import java.util.Map;
368040e5c400 Improved the Scheduler to be able to cancel running WSPLGEN jobs.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1127
diff changeset
13 import java.util.concurrent.Future;
368040e5c400 Improved the Scheduler to be able to cancel running WSPLGEN jobs.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1127
diff changeset
14 import java.util.concurrent.ScheduledThreadPoolExecutor;
1127
6b9877a9f6c1 Added infrastructure to start WSPLGEN calculations - the FloodMapState already start such calculations.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
15
6b9877a9f6c1 Added infrastructure to start WSPLGEN calculations - the FloodMapState already start such calculations.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
16 import org.apache.log4j.Logger;
6b9877a9f6c1 Added infrastructure to start WSPLGEN calculations - the FloodMapState already start such calculations.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
17
5831
bd047b71ab37 Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents: 3302
diff changeset
18 import org.dive4elements.artifacts.CallContext;
bd047b71ab37 Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents: 3302
diff changeset
19 import org.dive4elements.river.artifacts.model.map.WSPLGENJob;
1127
6b9877a9f6c1 Added infrastructure to start WSPLGEN calculations - the FloodMapState already start such calculations.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
20
6b9877a9f6c1 Added infrastructure to start WSPLGEN calculations - the FloodMapState already start such calculations.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
21
1970
368040e5c400 Improved the Scheduler to be able to cancel running WSPLGEN jobs.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1127
diff changeset
22 /**
368040e5c400 Improved the Scheduler to be able to cancel running WSPLGEN jobs.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1127
diff changeset
23 * The Scheduler is used to retrieve new WSPLGENJob. The incoming jobs are added
368040e5c400 Improved the Scheduler to be able to cancel running WSPLGEN jobs.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1127
diff changeset
24 * to a ScheduledThreadPoolExecutor. This thread pool has a number of worker
368040e5c400 Improved the Scheduler to be able to cancel running WSPLGEN jobs.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1127
diff changeset
25 * threads that processes the WSPLGENJobs. The number of worker threads can be
368040e5c400 Improved the Scheduler to be able to cancel running WSPLGEN jobs.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1127
diff changeset
26 * set using a System property <i>wsplgen.max.threads</i> ; its default value is
368040e5c400 Improved the Scheduler to be able to cancel running WSPLGEN jobs.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1127
diff changeset
27 * 1.
368040e5c400 Improved the Scheduler to be able to cancel running WSPLGEN jobs.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1127
diff changeset
28 *
368040e5c400 Improved the Scheduler to be able to cancel running WSPLGEN jobs.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1127
diff changeset
29 * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a>
368040e5c400 Improved the Scheduler to be able to cancel running WSPLGEN jobs.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1127
diff changeset
30 */
368040e5c400 Improved the Scheduler to be able to cancel running WSPLGEN jobs.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1127
diff changeset
31 public class Scheduler {
1127
6b9877a9f6c1 Added infrastructure to start WSPLGEN calculations - the FloodMapState already start such calculations.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
32
1970
368040e5c400 Improved the Scheduler to be able to cancel running WSPLGEN jobs.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1127
diff changeset
33 private class FutureJob {
368040e5c400 Improved the Scheduler to be able to cancel running WSPLGEN jobs.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1127
diff changeset
34 public Future future;
368040e5c400 Improved the Scheduler to be able to cancel running WSPLGEN jobs.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1127
diff changeset
35 public WSPLGENJob job;
368040e5c400 Improved the Scheduler to be able to cancel running WSPLGEN jobs.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1127
diff changeset
36
368040e5c400 Improved the Scheduler to be able to cancel running WSPLGEN jobs.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1127
diff changeset
37 public FutureJob(Future future, WSPLGENJob job) {
368040e5c400 Improved the Scheduler to be able to cancel running WSPLGEN jobs.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1127
diff changeset
38 this.future = future;
368040e5c400 Improved the Scheduler to be able to cancel running WSPLGEN jobs.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1127
diff changeset
39 this.job = job;
368040e5c400 Improved the Scheduler to be able to cancel running WSPLGEN jobs.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1127
diff changeset
40 }
368040e5c400 Improved the Scheduler to be able to cancel running WSPLGEN jobs.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1127
diff changeset
41 }
368040e5c400 Improved the Scheduler to be able to cancel running WSPLGEN jobs.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1127
diff changeset
42
368040e5c400 Improved the Scheduler to be able to cancel running WSPLGEN jobs.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1127
diff changeset
43 public static final int MAX_WSPLGEN_PROCESSES =
368040e5c400 Improved the Scheduler to be able to cancel running WSPLGEN jobs.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1127
diff changeset
44 Integer.getInteger("wsplgen.max.threads", 1);
1127
6b9877a9f6c1 Added infrastructure to start WSPLGEN calculations - the FloodMapState already start such calculations.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
45
6b9877a9f6c1 Added infrastructure to start WSPLGEN calculations - the FloodMapState already start such calculations.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
46
1970
368040e5c400 Improved the Scheduler to be able to cancel running WSPLGEN jobs.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1127
diff changeset
47 protected ScheduledThreadPoolExecutor pool;
368040e5c400 Improved the Scheduler to be able to cancel running WSPLGEN jobs.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1127
diff changeset
48 protected Map<String, FutureJob> jobs;
1127
6b9877a9f6c1 Added infrastructure to start WSPLGEN calculations - the FloodMapState already start such calculations.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
49
6b9877a9f6c1 Added infrastructure to start WSPLGEN calculations - the FloodMapState already start such calculations.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
50
6b9877a9f6c1 Added infrastructure to start WSPLGEN calculations - the FloodMapState already start such calculations.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
51 private static Scheduler INSTANCE;
6b9877a9f6c1 Added infrastructure to start WSPLGEN calculations - the FloodMapState already start such calculations.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
52
6b9877a9f6c1 Added infrastructure to start WSPLGEN calculations - the FloodMapState already start such calculations.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
53 private static final Logger logger = Logger.getLogger(Scheduler.class);
6b9877a9f6c1 Added infrastructure to start WSPLGEN calculations - the FloodMapState already start such calculations.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
54
6b9877a9f6c1 Added infrastructure to start WSPLGEN calculations - the FloodMapState already start such calculations.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
55
6b9877a9f6c1 Added infrastructure to start WSPLGEN calculations - the FloodMapState already start such calculations.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
56
6b9877a9f6c1 Added infrastructure to start WSPLGEN calculations - the FloodMapState already start such calculations.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
57 private Scheduler() {
1970
368040e5c400 Improved the Scheduler to be able to cancel running WSPLGEN jobs.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1127
diff changeset
58 jobs = new HashMap<String, FutureJob>();
368040e5c400 Improved the Scheduler to be able to cancel running WSPLGEN jobs.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1127
diff changeset
59 pool = new ScheduledThreadPoolExecutor(MAX_WSPLGEN_PROCESSES);
1127
6b9877a9f6c1 Added infrastructure to start WSPLGEN calculations - the FloodMapState already start such calculations.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
60 }
6b9877a9f6c1 Added infrastructure to start WSPLGEN calculations - the FloodMapState already start such calculations.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
61
6b9877a9f6c1 Added infrastructure to start WSPLGEN calculations - the FloodMapState already start such calculations.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
62
6b9877a9f6c1 Added infrastructure to start WSPLGEN calculations - the FloodMapState already start such calculations.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
63 public static Scheduler getInstance() {
6b9877a9f6c1 Added infrastructure to start WSPLGEN calculations - the FloodMapState already start such calculations.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
64 if (INSTANCE == null) {
6b9877a9f6c1 Added infrastructure to start WSPLGEN calculations - the FloodMapState already start such calculations.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
65 logger.info("Create new WSPLGEN Scheduler...");
6b9877a9f6c1 Added infrastructure to start WSPLGEN calculations - the FloodMapState already start such calculations.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
66
6b9877a9f6c1 Added infrastructure to start WSPLGEN calculations - the FloodMapState already start such calculations.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
67 INSTANCE = new Scheduler();
6b9877a9f6c1 Added infrastructure to start WSPLGEN calculations - the FloodMapState already start such calculations.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
68 }
6b9877a9f6c1 Added infrastructure to start WSPLGEN calculations - the FloodMapState already start such calculations.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
69
6b9877a9f6c1 Added infrastructure to start WSPLGEN calculations - the FloodMapState already start such calculations.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
70 return INSTANCE;
6b9877a9f6c1 Added infrastructure to start WSPLGEN calculations - the FloodMapState already start such calculations.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
71 }
6b9877a9f6c1 Added infrastructure to start WSPLGEN calculations - the FloodMapState already start such calculations.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
72
6b9877a9f6c1 Added infrastructure to start WSPLGEN calculations - the FloodMapState already start such calculations.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
73
1970
368040e5c400 Improved the Scheduler to be able to cancel running WSPLGEN jobs.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1127
diff changeset
74 public void addJob(final WSPLGENJob job) {
368040e5c400 Improved the Scheduler to be able to cancel running WSPLGEN jobs.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1127
diff changeset
75 synchronized (jobs) {
368040e5c400 Improved the Scheduler to be able to cancel running WSPLGEN jobs.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1127
diff changeset
76 WSPLGENFuture f = new WSPLGENFuture(new WSPLGENCallable(this, job));
368040e5c400 Improved the Scheduler to be able to cancel running WSPLGEN jobs.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1127
diff changeset
77 pool.execute(f);
1127
6b9877a9f6c1 Added infrastructure to start WSPLGEN calculations - the FloodMapState already start such calculations.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
78
1970
368040e5c400 Improved the Scheduler to be able to cancel running WSPLGEN jobs.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1127
diff changeset
79 jobs.put(job.getArtifact().identifier(), new FutureJob(f, job));
1127
6b9877a9f6c1 Added infrastructure to start WSPLGEN calculations - the FloodMapState already start such calculations.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
80
1970
368040e5c400 Improved the Scheduler to be able to cancel running WSPLGEN jobs.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1127
diff changeset
81 logger.info("New WSPLGEN job successfully added.");
1127
6b9877a9f6c1 Added infrastructure to start WSPLGEN calculations - the FloodMapState already start such calculations.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
82 }
6b9877a9f6c1 Added infrastructure to start WSPLGEN calculations - the FloodMapState already start such calculations.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
83 }
6b9877a9f6c1 Added infrastructure to start WSPLGEN calculations - the FloodMapState already start such calculations.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
84
6b9877a9f6c1 Added infrastructure to start WSPLGEN calculations - the FloodMapState already start such calculations.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
85
1970
368040e5c400 Improved the Scheduler to be able to cancel running WSPLGEN jobs.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1127
diff changeset
86 /**
368040e5c400 Improved the Scheduler to be able to cancel running WSPLGEN jobs.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1127
diff changeset
87 * Cancels a running (or queued) job.
368040e5c400 Improved the Scheduler to be able to cancel running WSPLGEN jobs.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1127
diff changeset
88 *
368040e5c400 Improved the Scheduler to be able to cancel running WSPLGEN jobs.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1127
diff changeset
89 * @param jobId The id of the job (which is the identifier of an Artifact).
368040e5c400 Improved the Scheduler to be able to cancel running WSPLGEN jobs.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1127
diff changeset
90 */
368040e5c400 Improved the Scheduler to be able to cancel running WSPLGEN jobs.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1127
diff changeset
91 public void cancelJob(String jobId) {
368040e5c400 Improved the Scheduler to be able to cancel running WSPLGEN jobs.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1127
diff changeset
92 logger.debug("Search job in queue: " + jobId);
1127
6b9877a9f6c1 Added infrastructure to start WSPLGEN calculations - the FloodMapState already start such calculations.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
93
1970
368040e5c400 Improved the Scheduler to be able to cancel running WSPLGEN jobs.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1127
diff changeset
94 synchronized (jobs) {
368040e5c400 Improved the Scheduler to be able to cancel running WSPLGEN jobs.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1127
diff changeset
95 FutureJob fj = jobs.get(jobId);
1127
6b9877a9f6c1 Added infrastructure to start WSPLGEN calculations - the FloodMapState already start such calculations.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
96
1970
368040e5c400 Improved the Scheduler to be able to cancel running WSPLGEN jobs.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1127
diff changeset
97 if (fj != null) {
368040e5c400 Improved the Scheduler to be able to cancel running WSPLGEN jobs.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1127
diff changeset
98 logger.info("Try to cancel job: " + jobId);
368040e5c400 Improved the Scheduler to be able to cancel running WSPLGEN jobs.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1127
diff changeset
99
368040e5c400 Improved the Scheduler to be able to cancel running WSPLGEN jobs.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1127
diff changeset
100 fj.future.cancel(true);
368040e5c400 Improved the Scheduler to be able to cancel running WSPLGEN jobs.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1127
diff changeset
101
368040e5c400 Improved the Scheduler to be able to cancel running WSPLGEN jobs.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1127
diff changeset
102 removeJob(jobId);
368040e5c400 Improved the Scheduler to be able to cancel running WSPLGEN jobs.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1127
diff changeset
103
368040e5c400 Improved the Scheduler to be able to cancel running WSPLGEN jobs.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1127
diff changeset
104 fj.job.getCallContext().afterBackground(
368040e5c400 Improved the Scheduler to be able to cancel running WSPLGEN jobs.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1127
diff changeset
105 CallContext.STORE);
368040e5c400 Improved the Scheduler to be able to cancel running WSPLGEN jobs.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1127
diff changeset
106
368040e5c400 Improved the Scheduler to be able to cancel running WSPLGEN jobs.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1127
diff changeset
107 logger.info("Canceled job: " + jobId);
1127
6b9877a9f6c1 Added infrastructure to start WSPLGEN calculations - the FloodMapState already start such calculations.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
108 }
6b9877a9f6c1 Added infrastructure to start WSPLGEN calculations - the FloodMapState already start such calculations.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
109 }
6b9877a9f6c1 Added infrastructure to start WSPLGEN calculations - the FloodMapState already start such calculations.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
110 }
6b9877a9f6c1 Added infrastructure to start WSPLGEN calculations - the FloodMapState already start such calculations.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
111
6b9877a9f6c1 Added infrastructure to start WSPLGEN calculations - the FloodMapState already start such calculations.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
112
1970
368040e5c400 Improved the Scheduler to be able to cancel running WSPLGEN jobs.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1127
diff changeset
113 protected void removeJob(String id) {
368040e5c400 Improved the Scheduler to be able to cancel running WSPLGEN jobs.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1127
diff changeset
114 synchronized (jobs) {
368040e5c400 Improved the Scheduler to be able to cancel running WSPLGEN jobs.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1127
diff changeset
115 jobs.remove(id);
1127
6b9877a9f6c1 Added infrastructure to start WSPLGEN calculations - the FloodMapState already start such calculations.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
116 }
6b9877a9f6c1 Added infrastructure to start WSPLGEN calculations - the FloodMapState already start such calculations.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
117 }
6b9877a9f6c1 Added infrastructure to start WSPLGEN calculations - the FloodMapState already start such calculations.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
118 }
6b9877a9f6c1 Added infrastructure to start WSPLGEN calculations - the FloodMapState already start such calculations.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
119 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf-8 :

http://dive4elements.wald.intevation.org