Mercurial > dive4elements > river
view flys-backend/src/main/java/de/intevation/seddb/model/Slotrechte.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 | 2ae732e2c65c |
children | 18619c1e7c2a |
line wrap: on
line source
package de.intevation.seddb.model; // Generated 14.06.2012 11:30:57 by Hibernate Tools 3.4.0.CR1 import java.math.BigDecimal; import java.util.HashSet; import java.util.Set; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.FetchType; import javax.persistence.Id; import javax.persistence.JoinColumn; import javax.persistence.ManyToOne; import javax.persistence.OneToMany; import javax.persistence.Table; /** * Slotrechte generated by hbm2java */ @Entity @Table(name="SLOTRECHTE" ,schema="SEDDB" ) public class Slotrechte implements java.io.Serializable { private long slotrechteid; private Messung messung; private BigDecimal uferabst; private BigDecimal tsand; private BigDecimal tschweb; private BigDecimal fv; private BigDecimal vm; private BigDecimal tiefe; private BigDecimal vsohle; private String bemerkung; private BigDecimal uferablinks; private Set<Sprobe> sprobes = new HashSet<Sprobe>(0); public Slotrechte() { } public Slotrechte(long slotrechteid, Messung messung, BigDecimal uferabst) { this.slotrechteid = slotrechteid; this.messung = messung; this.uferabst = uferabst; } public Slotrechte(long slotrechteid, Messung messung, BigDecimal uferabst, BigDecimal tsand, BigDecimal tschweb, BigDecimal fv, BigDecimal vm, BigDecimal tiefe, BigDecimal vsohle, String bemerkung, BigDecimal uferablinks, Set<Sprobe> sprobes) { this.slotrechteid = slotrechteid; this.messung = messung; this.uferabst = uferabst; this.tsand = tsand; this.tschweb = tschweb; this.fv = fv; this.vm = vm; this.tiefe = tiefe; this.vsohle = vsohle; this.bemerkung = bemerkung; this.uferablinks = uferablinks; this.sprobes = sprobes; } @Id @Column(name="SLOTRECHTEID", unique=true, nullable=false, precision=11, scale=0) public long getSlotrechteid() { return this.slotrechteid; } public void setSlotrechteid(long slotrechteid) { this.slotrechteid = slotrechteid; } @ManyToOne(fetch=FetchType.LAZY) @JoinColumn(name="MESSUNGID", nullable=false) public Messung getMessung() { return this.messung; } public void setMessung(Messung messung) { this.messung = messung; } @Column(name="UFERABST", nullable=false, precision=8, scale=3) public BigDecimal getUferabst() { return this.uferabst; } public void setUferabst(BigDecimal uferabst) { this.uferabst = uferabst; } @Column(name="TSAND", precision=8, scale=3) public BigDecimal getTsand() { return this.tsand; } public void setTsand(BigDecimal tsand) { this.tsand = tsand; } @Column(name="TSCHWEB", precision=8, scale=3) public BigDecimal getTschweb() { return this.tschweb; } public void setTschweb(BigDecimal tschweb) { this.tschweb = tschweb; } @Column(name="FV", precision=6, scale=3) public BigDecimal getFv() { return this.fv; } public void setFv(BigDecimal fv) { this.fv = fv; } @Column(name="VM", precision=6, scale=4) public BigDecimal getVm() { return this.vm; } public void setVm(BigDecimal vm) { this.vm = vm; } @Column(name="TIEFE", precision=8, scale=3) public BigDecimal getTiefe() { return this.tiefe; } public void setTiefe(BigDecimal tiefe) { this.tiefe = tiefe; } @Column(name="VSOHLE", precision=6, scale=4) public BigDecimal getVsohle() { return this.vsohle; } public void setVsohle(BigDecimal vsohle) { this.vsohle = vsohle; } @Column(name="BEMERKUNG", length=240) public String getBemerkung() { return this.bemerkung; } public void setBemerkung(String bemerkung) { this.bemerkung = bemerkung; } @Column(name="UFERABLINKS", precision=8, scale=3) public BigDecimal getUferablinks() { return this.uferablinks; } public void setUferablinks(BigDecimal uferablinks) { this.uferablinks = uferablinks; } @OneToMany(fetch=FetchType.LAZY, mappedBy="slotrechte") public Set<Sprobe> getSprobes() { return this.sprobes; } public void setSprobes(Set<Sprobe> sprobes) { this.sprobes = sprobes; } }