Cache.java

  1. /*
  2.  * GovWay - A customizable API Gateway
  3.  * https://govway.org
  4.  *
  5.  * Copyright (c) 2005-2025 Link.it srl (https://link.it).
  6.  *
  7.  * This program is free software: you can redistribute it and/or modify
  8.  * it under the terms of the GNU General Public License version 3, as published by
  9.  * the Free Software Foundation.
  10.  *
  11.  * This program is distributed in the hope that it will be useful,
  12.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  14.  * GNU General Public License for more details.
  15.  *
  16.  * You should have received a copy of the GNU General Public License
  17.  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  18.  *
  19.  */
  20. package org.openspcoop2.core.config;

  21. import javax.xml.bind.annotation.XmlAccessType;
  22. import javax.xml.bind.annotation.XmlAccessorType;
  23. import javax.xml.bind.annotation.XmlAttribute;
  24. import javax.xml.bind.annotation.XmlRootElement;
  25. import javax.xml.bind.annotation.XmlType;
  26. import org.openspcoop2.core.config.constants.AlgoritmoCache;
  27. import java.io.Serializable;


  28. /** <p>Java class for cache complex type.
  29.  *
  30.  * <p>The following schema fragment specifies the expected content contained within this class.
  31.  *
  32.  * <pre>
  33.  * &lt;complexType name="cache"&gt;
  34.  *      &lt;attribute name="dimensione" type="{http://www.w3.org/2001/XMLSchema}string" use="optional"/&gt;
  35.  *      &lt;attribute name="algoritmo" type="{http://www.openspcoop2.org/core/config}AlgoritmoCache" use="optional" default="lru"/&gt;
  36.  *      &lt;attribute name="item-idle-time" type="{http://www.w3.org/2001/XMLSchema}string" use="optional"/&gt;
  37.  *      &lt;attribute name="item-life-second" type="{http://www.w3.org/2001/XMLSchema}string" use="optional"/&gt;
  38.  * &lt;/complexType&gt;
  39.  * </pre>
  40.  *
  41.  * @version $Rev$, $Date$
  42.  *
  43.  * @author Poli Andrea (poli@link.it)
  44.  * @author $Author$
  45.  * */

  46. @XmlAccessorType(XmlAccessType.FIELD)
  47. @XmlType(name = "cache")

  48. @XmlRootElement(name = "cache")

  49. public class Cache extends org.openspcoop2.utils.beans.BaseBeanWithId implements Serializable , Cloneable {
  50.   public Cache() {
  51.     super();
  52.   }

  53.   public java.lang.String getDimensione() {
  54.     return this.dimensione;
  55.   }

  56.   public void setDimensione(java.lang.String dimensione) {
  57.     this.dimensione = dimensione;
  58.   }

  59.   public void setAlgoritmoRawEnumValue(String value) {
  60.     this.algoritmo = (AlgoritmoCache) AlgoritmoCache.toEnumConstantFromString(value);
  61.   }

  62.   public String getAlgoritmoRawEnumValue() {
  63.     if(this.algoritmo == null){
  64.         return null;
  65.     }else{
  66.         return this.algoritmo.toString();
  67.     }
  68.   }

  69.   public org.openspcoop2.core.config.constants.AlgoritmoCache getAlgoritmo() {
  70.     return this.algoritmo;
  71.   }

  72.   public void setAlgoritmo(org.openspcoop2.core.config.constants.AlgoritmoCache algoritmo) {
  73.     this.algoritmo = algoritmo;
  74.   }

  75.   public java.lang.String getItemIdleTime() {
  76.     return this.itemIdleTime;
  77.   }

  78.   public void setItemIdleTime(java.lang.String itemIdleTime) {
  79.     this.itemIdleTime = itemIdleTime;
  80.   }

  81.   public java.lang.String getItemLifeSecond() {
  82.     return this.itemLifeSecond;
  83.   }

  84.   public void setItemLifeSecond(java.lang.String itemLifeSecond) {
  85.     this.itemLifeSecond = itemLifeSecond;
  86.   }

  87.   private static final long serialVersionUID = 1L;



  88.   @javax.xml.bind.annotation.XmlSchemaType(name="string")
  89.   @XmlAttribute(name="dimensione",required=false)
  90.   protected java.lang.String dimensione;

  91.   @javax.xml.bind.annotation.XmlTransient
  92.   protected java.lang.String algoritmoRawEnumValue;

  93.   @XmlAttribute(name="algoritmo",required=false)
  94.   protected AlgoritmoCache algoritmo = (AlgoritmoCache) AlgoritmoCache.toEnumConstantFromString("lru");

  95.   @javax.xml.bind.annotation.XmlSchemaType(name="string")
  96.   @XmlAttribute(name="item-idle-time",required=false)
  97.   protected java.lang.String itemIdleTime;

  98.   @javax.xml.bind.annotation.XmlSchemaType(name="string")
  99.   @XmlAttribute(name="item-life-second",required=false)
  100.   protected java.lang.String itemLifeSecond;

  101. }