donaldp     01/04/18 06:14:49

  Modified:    src/java/org/apache/excalibur/pool AbstractPool.java
                        DefaultObjectFactory.java DefaultPool.java
                        HardResourceLimitingPool.java ObjectFactory.java
                        Pool.java SingleThreadedPool.java
                        SoftResourceLimitingPool.java
  Added:       src/java/org/apache/excalibur/pool Poolable.java
                        Recyclable.java
  Log:
  Updated location of Pool to excalibur.pool package
  
  Revision  Changes    Path
  1.2       +2 -4      
jakarta-avalon/src/java/org/apache/excalibur/pool/AbstractPool.java
  
  Index: AbstractPool.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-avalon/src/java/org/apache/excalibur/pool/AbstractPool.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- AbstractPool.java 2001/04/17 03:07:48     1.1
  +++ AbstractPool.java 2001/04/18 13:14:45     1.2
  @@ -9,11 +9,9 @@
   
   import java.util.Stack;
   import java.util.Vector;
  -import org.apache.avalon.AbstractLoggable;
  +import org.apache.avalon.logger.AbstractLoggable;
   import org.apache.avalon.Initializable;
  -import org.apache.avalon.Poolable;
  -import org.apache.avalon.Recyclable;
  -import org.apache.avalon.ThreadSafe;
  +import org.apache.avalon.thread.ThreadSafe;
   
   /**
    * This is an <code>Pool</code> that caches Poolable objects for reuse.
  
  
  
  1.2       +0 -2      
jakarta-avalon/src/java/org/apache/excalibur/pool/DefaultObjectFactory.java
  
  Index: DefaultObjectFactory.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-avalon/src/java/org/apache/excalibur/pool/DefaultObjectFactory.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- DefaultObjectFactory.java 2001/04/17 03:07:48     1.1
  +++ DefaultObjectFactory.java 2001/04/18 13:14:46     1.2
  @@ -8,8 +8,6 @@
   package org.apache.excalibur.pool;
   
   import java.lang.reflect.Constructor;
  -import org.apache.avalon.Poolable;
  -import org.apache.avalon.Recyclable;
   
   /**
    * This is the default for factory that is used to create objects for Pool.
  
  
  
  1.2       +0 -3      
jakarta-avalon/src/java/org/apache/excalibur/pool/DefaultPool.java
  
  Index: DefaultPool.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-avalon/src/java/org/apache/excalibur/pool/DefaultPool.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- DefaultPool.java  2001/04/17 03:07:48     1.1
  +++ DefaultPool.java  2001/04/18 13:14:46     1.2
  @@ -7,9 +7,6 @@
    */
   package org.apache.excalibur.pool;
   
  -import org.apache.avalon.Poolable;
  -import org.apache.avalon.Recyclable;
  -
   /**
    * This is an <code>Pool</code> that caches Poolable objects for reuse.
    *
  
  
  
  1.2       +1 -3      
jakarta-avalon/src/java/org/apache/excalibur/pool/HardResourceLimitingPool.java
  
  Index: HardResourceLimitingPool.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-avalon/src/java/org/apache/excalibur/pool/HardResourceLimitingPool.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- HardResourceLimitingPool.java     2001/04/17 03:07:48     1.1
  +++ HardResourceLimitingPool.java     2001/04/18 13:14:46     1.2
  @@ -8,9 +8,7 @@
   package org.apache.excalibur.pool;
   
   import org.apache.avalon.Initializable;
  -import org.apache.avalon.Poolable;
  -import org.apache.avalon.Recyclable;
  -import org.apache.avalon.ThreadSafe;
  +import org.apache.avalon.thread.ThreadSafe;
   
   /**
    * This is a implementation of  <code>Pool</code> that is thread safe.
  
  
  
  1.2       +1 -2      
jakarta-avalon/src/java/org/apache/excalibur/pool/ObjectFactory.java
  
  Index: ObjectFactory.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-avalon/src/java/org/apache/excalibur/pool/ObjectFactory.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ObjectFactory.java        2001/04/17 03:07:48     1.1
  +++ ObjectFactory.java        2001/04/18 13:14:46     1.2
  @@ -7,8 +7,7 @@
    */
   package org.apache.excalibur.pool;
   
  -import org.apache.avalon.Component;
  -import org.apache.avalon.Poolable;
  +import org.apache.avalon.component.Component;
   
   /**
    * This is the interface for factory that is used to create objects for Pool.
  
  
  
  1.2       +1 -2      jakarta-avalon/src/java/org/apache/excalibur/pool/Pool.java
  
  Index: Pool.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon/src/java/org/apache/excalibur/pool/Pool.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Pool.java 2001/04/17 03:07:48     1.1
  +++ Pool.java 2001/04/18 13:14:46     1.2
  @@ -7,8 +7,7 @@
    */
   package org.apache.excalibur.pool;
   
  -import org.apache.avalon.Component;
  -import org.apache.avalon.Poolable;
  +import org.apache.avalon.component.Component;
   
   /**
    * This is an <code>Pool</code> that caches Poolable objects for reuse.
  
  
  
  1.2       +1 -3      
jakarta-avalon/src/java/org/apache/excalibur/pool/SingleThreadedPool.java
  
  Index: SingleThreadedPool.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-avalon/src/java/org/apache/excalibur/pool/SingleThreadedPool.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- SingleThreadedPool.java   2001/04/17 03:07:48     1.1
  +++ SingleThreadedPool.java   2001/04/18 13:14:46     1.2
  @@ -8,9 +8,7 @@
   package org.apache.excalibur.pool;
   
   import org.apache.avalon.Initializable;
  -import org.apache.avalon.Poolable;
  -import org.apache.avalon.Recyclable;
  -import org.apache.avalon.SingleThreaded;
  +import org.apache.avalon.thread.SingleThreaded;
   
   /**
    * This is an <code>Pool</code> that caches Poolable objects for reuse.
  
  
  
  1.2       +0 -1      
jakarta-avalon/src/java/org/apache/excalibur/pool/SoftResourceLimitingPool.java
  
  Index: SoftResourceLimitingPool.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-avalon/src/java/org/apache/excalibur/pool/SoftResourceLimitingPool.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- SoftResourceLimitingPool.java     2001/04/17 03:07:48     1.1
  +++ SoftResourceLimitingPool.java     2001/04/18 13:14:46     1.2
  @@ -8,7 +8,6 @@
   package org.apache.excalibur.pool;
   
   import org.apache.avalon.Initializable;
  -import org.apache.avalon.Poolable;
   
   /**
    * This is an <code>Pool</code> that caches Poolable objects for reuse.
  
  
  
  1.1                  jakarta-avalon/src/java/org/apache/excalibur/pool/Poolable.java
  
  Index: Poolable.java
  ===================================================================
  /*
   * Copyright (C) The Apache Software Foundation. All rights reserved.
   *
   * This software is published under the terms of the Apache Software License
   * version 1.1, a copy of which has been included with this distribution in
   * the LICENSE file.
   */
  package org.apache.excalibur.pool;
  
  /**
   * Poolable marker interface.
   *
   * Components implement this interface if it is reasonable to
   * Pool the object. Components that don't implement this interface
   * will be created anew via a factory.
   *
   * NB: It was a deliberat e choice not to extend Component. This will have to
   * be reassed once we see it in action.
   *
   * @author <a href="mailto:[EMAIL PROTECTED]">Peter Donald</a>
   */
  public interface Poolable
  {
  }
  
  
  
  1.1                  
jakarta-avalon/src/java/org/apache/excalibur/pool/Recyclable.java
  
  Index: Recyclable.java
  ===================================================================
  /*
   * Copyright (C) The Apache Software Foundation. All rights reserved.
   *
   * This software is published under the terms of the Apache Software License
   * version 1.1, a copy of which has been included with this distribution in
   * the LICENSE file.
   */
  package org.apache.excalibur.pool;
  
  /**
   * This interface standardizes the behaviour of a recyclable object.
   * A recyclable object is defined as an object that can be used to
   * encapsulate another object without being altered by its content.
   * Therefore, a recyclable object may be recycled and reused many times.
   *
   * This is helpful in cases where recyclable objects are continously
   * created and destroied, causing a much greater amount of garbage to
   * be collected by the JVM garbage collector. By making it recyclable,
   * it is possible to reduce the GC execution time thus incrementing the
   * overall performance of a process and decrementing the chance of
   * memory overflow.
   *
   * Every implementation must provide their own method to allow this
   * recyclable object to be reused by setting its content.
   *
   * @author <a href="mailto:[EMAIL PROTECTED]">Stefano Mazzocchi</a>
   * @author <a href="mailto:[EMAIL PROTECTED]">Peter Donald</a>
   */
  public interface Recyclable
      extends Poolable
  {
      /**
       * This method should be implemented to remove all costly resources
       * in object. These resources can be object references, database connections,
       * threads etc. What is categorised as "costly" resources is determined on
       * a case by case analysis.
       */
      void recycle();
  }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to