view flys-backend/src/main/java/de/intevation/seddb/model/Sprobe.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 javax.persistence.AttributeOverride;
import javax.persistence.AttributeOverrides;
import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * Sprobe generated by hbm2java
 */
@Entity
@Table(name="SPROBE"
    ,schema="SEDDB"
)
public class Sprobe  implements java.io.Serializable {


     private SprobeId id;
     private Slotrechte slotrechte;
     private short wprozpkt;
     private BigDecimal wpkt;
     private BigDecimal vpkt;
     private BigDecimal csandpkt;
     private BigDecimal cschwebpkt;
     private BigDecimal sandtrieb;
     private BigDecimal schwebtrieb;

    public Sprobe() {
    }


    public Sprobe(SprobeId id, Slotrechte slotrechte, short wprozpkt, BigDecimal wpkt, BigDecimal vpkt, BigDecimal csandpkt, BigDecimal cschwebpkt) {
        this.id = id;
        this.slotrechte = slotrechte;
        this.wprozpkt = wprozpkt;
        this.wpkt = wpkt;
        this.vpkt = vpkt;
        this.csandpkt = csandpkt;
        this.cschwebpkt = cschwebpkt;
    }
    public Sprobe(SprobeId id, Slotrechte slotrechte, short wprozpkt, BigDecimal wpkt, BigDecimal vpkt, BigDecimal csandpkt, BigDecimal cschwebpkt, BigDecimal sandtrieb, BigDecimal schwebtrieb) {
       this.id = id;
       this.slotrechte = slotrechte;
       this.wprozpkt = wprozpkt;
       this.wpkt = wpkt;
       this.vpkt = vpkt;
       this.csandpkt = csandpkt;
       this.cschwebpkt = cschwebpkt;
       this.sandtrieb = sandtrieb;
       this.schwebtrieb = schwebtrieb;
    }

     @EmbeddedId


    @AttributeOverrides( {
        @AttributeOverride(name="slotrechteid", column=@Column(name="SLOTRECHTEID", nullable=false, precision=11, scale=0) ),
        @AttributeOverride(name="lfdnr", column=@Column(name="LFDNR", nullable=false, precision=5, scale=0) ) } )
    public SprobeId getId() {
        return this.id;
    }

    public void setId(SprobeId id) {
        this.id = id;
    }

@ManyToOne(fetch=FetchType.LAZY)
    @JoinColumn(name="SLOTRECHTEID", nullable=false, insertable=false, updatable=false)
    public Slotrechte getSlotrechte() {
        return this.slotrechte;
    }

    public void setSlotrechte(Slotrechte slotrechte) {
        this.slotrechte = slotrechte;
    }


    @Column(name="WPROZPKT", nullable=false, precision=3, scale=0)
    public short getWprozpkt() {
        return this.wprozpkt;
    }

    public void setWprozpkt(short wprozpkt) {
        this.wprozpkt = wprozpkt;
    }


    @Column(name="WPKT", nullable=false, precision=8, scale=3)
    public BigDecimal getWpkt() {
        return this.wpkt;
    }

    public void setWpkt(BigDecimal wpkt) {
        this.wpkt = wpkt;
    }


    @Column(name="VPKT", nullable=false, precision=6, scale=4)
    public BigDecimal getVpkt() {
        return this.vpkt;
    }

    public void setVpkt(BigDecimal vpkt) {
        this.vpkt = vpkt;
    }


    @Column(name="CSANDPKT", nullable=false, precision=8, scale=3)
    public BigDecimal getCsandpkt() {
        return this.csandpkt;
    }

    public void setCsandpkt(BigDecimal csandpkt) {
        this.csandpkt = csandpkt;
    }


    @Column(name="CSCHWEBPKT", nullable=false, precision=8, scale=3)
    public BigDecimal getCschwebpkt() {
        return this.cschwebpkt;
    }

    public void setCschwebpkt(BigDecimal cschwebpkt) {
        this.cschwebpkt = cschwebpkt;
    }


    @Column(name="SANDTRIEB", precision=8, scale=3)
    public BigDecimal getSandtrieb() {
        return this.sandtrieb;
    }

    public void setSandtrieb(BigDecimal sandtrieb) {
        this.sandtrieb = sandtrieb;
    }


    @Column(name="SCHWEBTRIEB", precision=8, scale=3)
    public BigDecimal getSchwebtrieb() {
        return this.schwebtrieb;
    }

    public void setSchwebtrieb(BigDecimal schwebtrieb) {
        this.schwebtrieb = schwebtrieb;
    }
}

http://dive4elements.wald.intevation.org