jakarta-jcs-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From asm...@apache.org
Subject cvs commit: jakarta-turbine-jcs/src/java/org/apache/jcs/engine CompositeCacheAttributes.java
Date Mon, 10 May 2004 01:17:01 GMT
asmuts      2004/05/09 18:17:01

  Modified:    src/java/org/apache/jcs/engine CompositeCacheAttributes.java
  Log:
  added a maximum number to spool per run for the shrinker.
  
  Revision  Changes    Path
  1.4       +28 -0     jakarta-turbine-jcs/src/java/org/apache/jcs/engine/CompositeCacheAttributes.java
  
  Index: CompositeCacheAttributes.java
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-jcs/src/java/org/apache/jcs/engine/CompositeCacheAttributes.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- CompositeCacheAttributes.java	15 Apr 2004 19:22:49 -0000	1.3
  +++ CompositeCacheAttributes.java	10 May 2004 01:17:01 -0000	1.4
  @@ -46,6 +46,8 @@
        */
       protected long shrinkerIntervalSeconds = 30;
   
  +    protected int maxSpoolPerRun = -1;
  +
       private String cacheName;
   
       private String memoryCacheName;
  @@ -257,6 +259,31 @@
           return this.shrinkerIntervalSeconds;
       }
   
  +    /**
  +     * If UseMemoryShrinker is true the memory cache should auto-expire elements
  +     * to reclaim space. This sets the maximum number of items to spool per run.
  +     *
  +     * If the value is -1, then there is no limit to the number of items to be
  +     * spooled.
  +     *
  +     * @param seconds The new maxSpoolPerRun value
  +     */
  +    public void setMaxSpoolPerRun( int maxSpoolPerRun )
  +    {
  +      this.maxSpoolPerRun = maxSpoolPerRun;
  +    }
  +
  +    /**
  +     * If UseMemoryShrinker is true the memory cache should auto-expire elements
  +     * to reclaim space. This gets the maximum number of items to spool per run.
  +     *
  +     * @return The maxSpoolPerRun value
  +     */
  +    public int getMaxSpoolPerRun()
  +    {
  +      return this.maxSpoolPerRun;
  +    }
  +
   
       /**
        * Description of the Method
  @@ -293,6 +320,7 @@
               .append( ", useRemote = " ).append( useRemote )
               .append( ", useDisk = " ).append( useDisk )
               .append( ", maxObjs = " ).append( maxObjs )
  +            .append( ", maxSpoolPerRun = " ).append( maxSpoolPerRun )
               .append( " ]" );
   
           return dump.toString();
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-jcs-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-jcs-dev-help@jakarta.apache.org


Mime
View raw message