annotate flys-backend/src/main/java/de/intevation/flys/model/BoundaryKind.java @ 5779:ebec12def170

Datacage: Add a pool of builders to make it multi threadable. XML DOM is not thread safe. Therefore the old implementation only allowed one thread to use the builder at a time. As the complexity of the configuration has increased over time this has become a bottleneck of the whole application because it took quiet some time to build a result. Furthermore the builder code path is visited very frequent. So many concurrent requests were piled up resulting in long waits for the users. To mitigate this problem a round robin pool of builders is used now. Each of the pooled builders has an independent copy of the XML template and can be run in parallel. The number of builders is determined by the system property 'flys.datacage.pool.size'. It defaults to 4.
author Sascha L. Teichmann <teichmann@intevation.de>
date Sun, 21 Apr 2013 12:48:09 +0200
parents 1d95391d056b
children
rev   line source
5060
c629719b87e7 Add the simple lookup table classes to the model
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
1 package de.intevation.flys.model;
c629719b87e7 Add the simple lookup table classes to the model
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
2
c629719b87e7 Add the simple lookup table classes to the model
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
3 import java.io.Serializable;
c629719b87e7 Add the simple lookup table classes to the model
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
4
c629719b87e7 Add the simple lookup table classes to the model
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
5 import javax.persistence.Column;
c629719b87e7 Add the simple lookup table classes to the model
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
6 import javax.persistence.Entity;
c629719b87e7 Add the simple lookup table classes to the model
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
7 import javax.persistence.Id;
c629719b87e7 Add the simple lookup table classes to the model
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
8 import javax.persistence.Table;
c629719b87e7 Add the simple lookup table classes to the model
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
9
c629719b87e7 Add the simple lookup table classes to the model
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
10 @Entity
c629719b87e7 Add the simple lookup table classes to the model
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
11 @Table(name = "boundary_kinds")
c629719b87e7 Add the simple lookup table classes to the model
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
12 public class BoundaryKind implements Serializable {
5081
1d95391d056b Made it compile again. Removed obsolete imports. Removed C++-alike ';' at end of classes.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5064
diff changeset
13
5060
c629719b87e7 Add the simple lookup table classes to the model
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
14 private Integer id;
5064
fb7c4ad94bd8 Fix build: some more imports some less imports some copy paste errors
Andre Heinecke <aheinecke@intevation.de>
parents: 5060
diff changeset
15 private String name;
5060
c629719b87e7 Add the simple lookup table classes to the model
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
16
c629719b87e7 Add the simple lookup table classes to the model
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
17 @Id
c629719b87e7 Add the simple lookup table classes to the model
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
18 @Column(name = "id")
c629719b87e7 Add the simple lookup table classes to the model
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
19 public Integer getId() {
c629719b87e7 Add the simple lookup table classes to the model
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
20 return id;
c629719b87e7 Add the simple lookup table classes to the model
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
21 }
c629719b87e7 Add the simple lookup table classes to the model
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
22
c629719b87e7 Add the simple lookup table classes to the model
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
23 public void setId(Integer id) {
c629719b87e7 Add the simple lookup table classes to the model
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
24 this.id = id;
c629719b87e7 Add the simple lookup table classes to the model
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
25 }
c629719b87e7 Add the simple lookup table classes to the model
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
26
c629719b87e7 Add the simple lookup table classes to the model
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
27 /**
c629719b87e7 Add the simple lookup table classes to the model
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
28 * Get name.
c629719b87e7 Add the simple lookup table classes to the model
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
29 *
c629719b87e7 Add the simple lookup table classes to the model
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
30 * @return name of the kind of boundary as String.
c629719b87e7 Add the simple lookup table classes to the model
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
31 */
c629719b87e7 Add the simple lookup table classes to the model
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
32 @Column(name = "name")
5081
1d95391d056b Made it compile again. Removed obsolete imports. Removed C++-alike ';' at end of classes.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5064
diff changeset
33 public String getName() {
5060
c629719b87e7 Add the simple lookup table classes to the model
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
34 return name;
c629719b87e7 Add the simple lookup table classes to the model
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
35 }
c629719b87e7 Add the simple lookup table classes to the model
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
36
c629719b87e7 Add the simple lookup table classes to the model
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
37 /**
c629719b87e7 Add the simple lookup table classes to the model
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
38 * Set name.
c629719b87e7 Add the simple lookup table classes to the model
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
39 *
c629719b87e7 Add the simple lookup table classes to the model
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
40 * @param name the value to set.
c629719b87e7 Add the simple lookup table classes to the model
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
41 */
5081
1d95391d056b Made it compile again. Removed obsolete imports. Removed C++-alike ';' at end of classes.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5064
diff changeset
42 public void setName(String name) {
5060
c629719b87e7 Add the simple lookup table classes to the model
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
43 this.name = name;
c629719b87e7 Add the simple lookup table classes to the model
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
44 }
5081
1d95391d056b Made it compile again. Removed obsolete imports. Removed C++-alike ';' at end of classes.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5064
diff changeset
45 }

http://dive4elements.wald.intevation.org