annotate flys-backend/src/main/java/de/intevation/flys/model/CrossSectionTrackKind.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 88e3473a3846
children
rev   line source
5242
88e3473a3846 Add kind handling for floodplains and crossectiontracks
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
1 package de.intevation.flys.model;
88e3473a3846 Add kind handling for floodplains and crossectiontracks
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
2
88e3473a3846 Add kind handling for floodplains and crossectiontracks
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
3 import java.io.Serializable;
88e3473a3846 Add kind handling for floodplains and crossectiontracks
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
4
88e3473a3846 Add kind handling for floodplains and crossectiontracks
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
5 import javax.persistence.Column;
88e3473a3846 Add kind handling for floodplains and crossectiontracks
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
6 import javax.persistence.Entity;
88e3473a3846 Add kind handling for floodplains and crossectiontracks
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
7 import javax.persistence.Id;
88e3473a3846 Add kind handling for floodplains and crossectiontracks
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
8 import javax.persistence.Table;
88e3473a3846 Add kind handling for floodplains and crossectiontracks
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
9
88e3473a3846 Add kind handling for floodplains and crossectiontracks
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
10 @Entity
88e3473a3846 Add kind handling for floodplains and crossectiontracks
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
11 @Table(name = "cross_section_track_kinds")
88e3473a3846 Add kind handling for floodplains and crossectiontracks
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
12 public class CrossSectionTrackKind implements Serializable {
88e3473a3846 Add kind handling for floodplains and crossectiontracks
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
13 private Integer id;
88e3473a3846 Add kind handling for floodplains and crossectiontracks
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
14 private String name;
88e3473a3846 Add kind handling for floodplains and crossectiontracks
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
15
88e3473a3846 Add kind handling for floodplains and crossectiontracks
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
16 @Id
88e3473a3846 Add kind handling for floodplains and crossectiontracks
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
17 @Column(name = "id")
88e3473a3846 Add kind handling for floodplains and crossectiontracks
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
18 public Integer getId() {
88e3473a3846 Add kind handling for floodplains and crossectiontracks
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
19 return id;
88e3473a3846 Add kind handling for floodplains and crossectiontracks
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
20 }
88e3473a3846 Add kind handling for floodplains and crossectiontracks
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
21
88e3473a3846 Add kind handling for floodplains and crossectiontracks
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
22 public void setId(Integer id) {
88e3473a3846 Add kind handling for floodplains and crossectiontracks
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
23 this.id = id;
88e3473a3846 Add kind handling for floodplains and crossectiontracks
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
24 }
88e3473a3846 Add kind handling for floodplains and crossectiontracks
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
25
88e3473a3846 Add kind handling for floodplains and crossectiontracks
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
26 /**
88e3473a3846 Add kind handling for floodplains and crossectiontracks
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
27 * Get name.
88e3473a3846 Add kind handling for floodplains and crossectiontracks
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
28 *
88e3473a3846 Add kind handling for floodplains and crossectiontracks
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
29 * @return The name of the Cross section kind as String.
88e3473a3846 Add kind handling for floodplains and crossectiontracks
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
30 */
88e3473a3846 Add kind handling for floodplains and crossectiontracks
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
31 @Column(name = "name")
88e3473a3846 Add kind handling for floodplains and crossectiontracks
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
32 public String getName() {
88e3473a3846 Add kind handling for floodplains and crossectiontracks
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
33 return name;
88e3473a3846 Add kind handling for floodplains and crossectiontracks
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
34 }
88e3473a3846 Add kind handling for floodplains and crossectiontracks
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
35
88e3473a3846 Add kind handling for floodplains and crossectiontracks
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
36 /**
88e3473a3846 Add kind handling for floodplains and crossectiontracks
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
37 * Set name.
88e3473a3846 Add kind handling for floodplains and crossectiontracks
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
38 *
88e3473a3846 Add kind handling for floodplains and crossectiontracks
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
39 * @param name the value to set.
88e3473a3846 Add kind handling for floodplains and crossectiontracks
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
40 */
88e3473a3846 Add kind handling for floodplains and crossectiontracks
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
41 public void setName(String name) {
88e3473a3846 Add kind handling for floodplains and crossectiontracks
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
42 this.name = name;
88e3473a3846 Add kind handling for floodplains and crossectiontracks
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
43 }
88e3473a3846 Add kind handling for floodplains and crossectiontracks
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
44 }
88e3473a3846 Add kind handling for floodplains and crossectiontracks
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
45

http://dive4elements.wald.intevation.org