You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by rw...@apache.org on 2002/05/01 06:54:52 UTC

cvs commit: jakarta-commons/pool/src/java/org/apache/commons/pool BaseObjectPool.java KeyedObjectPool.java KeyedObjectPoolFactory.java ObjectPoolFactory.java PoolableObjectFactory.java

rwaldhoff    02/04/30 21:54:52

  Modified:    pool/src/java/org/apache/commons/pool BaseObjectPool.java
                        KeyedObjectPool.java KeyedObjectPoolFactory.java
                        ObjectPoolFactory.java PoolableObjectFactory.java
  Log:
  cosmetic changes
  
  Revision  Changes    Path
  1.2       +5 -5      jakarta-commons/pool/src/java/org/apache/commons/pool/BaseObjectPool.java
  
  Index: BaseObjectPool.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/pool/src/java/org/apache/commons/pool/BaseObjectPool.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- BaseObjectPool.java	29 Apr 2002 12:11:30 -0000	1.1
  +++ BaseObjectPool.java	1 May 2002 04:54:52 -0000	1.2
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-commons/pool/src/java/org/apache/commons/pool/BaseObjectPool.java,v 1.1 2002/04/29 12:11:30 rwaldhoff Exp $
  - * $Revision: 1.1 $
  - * $Date: 2002/04/29 12:11:30 $
  + * $Header: /home/cvs/jakarta-commons/pool/src/java/org/apache/commons/pool/BaseObjectPool.java,v 1.2 2002/05/01 04:54:52 rwaldhoff Exp $
  + * $Revision: 1.2 $
  + * $Date: 2002/05/01 04:54:52 $
    *
    * ====================================================================
    *
  @@ -67,7 +67,7 @@
    * {@link UnsupportedOperationException}.
    * 
    * @author Rodney Waldhoff
  - * @version $Revision: 1.1 $ $Date: 2002/04/29 12:11:30 $
  + * @version $Revision: 1.2 $ $Date: 2002/05/01 04:54:52 $
    */
   public abstract class BaseObjectPool implements ObjectPool {
       public abstract Object borrowObject() throws Exception;
  @@ -95,7 +95,7 @@
       }
   
       /**
  -     * Not supported in this base implementation.
  +     * Does nothing this base implementation.
        */
       public void close() throws Exception {
       }
  
  
  
  1.4       +24 -22    jakarta-commons/pool/src/java/org/apache/commons/pool/KeyedObjectPool.java
  
  Index: KeyedObjectPool.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/pool/src/java/org/apache/commons/pool/KeyedObjectPool.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- KeyedObjectPool.java	17 Mar 2002 14:55:21 -0000	1.3
  +++ KeyedObjectPool.java	1 May 2002 04:54:52 -0000	1.4
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-commons/pool/src/java/org/apache/commons/pool/KeyedObjectPool.java,v 1.3 2002/03/17 14:55:21 rwaldhoff Exp $
  - * $Revision: 1.3 $
  - * $Date: 2002/03/17 14:55:21 $
  + * $Header: /home/cvs/jakarta-commons/pool/src/java/org/apache/commons/pool/KeyedObjectPool.java,v 1.4 2002/05/01 04:54:52 rwaldhoff Exp $
  + * $Revision: 1.4 $
  + * $Date: 2002/05/01 04:54:52 $
    *
    * ====================================================================
    *
  @@ -92,7 +92,7 @@
    * </p>
    *
    * @author Rodney Waldhoff
  - * @version $Revision: 1.3 $ $Date: 2002/03/17 14:55:21 $ 
  + * @version $Revision: 1.4 $ $Date: 2002/05/01 04:54:52 $ 
    *
    * @see KeyedPoolableObjectFactory
    * @see KeyedObjectPoolFactory
  @@ -113,7 +113,7 @@
        * @param key the key used to obtain the object
        * @return an instance from my pool.
        */
  -    public abstract Object borrowObject(Object key) throws Exception;
  +    Object borrowObject(Object key) throws Exception;
   
       /**
        * Return an instance to my pool.
  @@ -127,12 +127,12 @@
        * @param key the key used to obtain the object
        * @param obj a {@link #borrowObject(java.lang.Object) borrowed} instance to be returned.
        */
  -    public abstract void returnObject(Object key, Object obj) throws Exception;
  +    void returnObject(Object key, Object obj) throws Exception;
   
       /**
        * Returns the number of instances
        * corresponding to the given <i>key</i>
  -     * currently idle in my pool.
  +     * currently idle in my pool (optional operation).
        * Throws {@link UnsupportedOperationException}
        * if this information is not available.
        *
  @@ -140,13 +140,13 @@
        * @return the number of instances corresponding to the given <i>key</i> currently idle in my pool
        * @throws UnsupportedOperationException when this implementation doesn't support the operation
        */
  -    public abstract int numIdle(Object key) throws UnsupportedOperationException;
  +    int numIdle(Object key) throws UnsupportedOperationException;
   
       /**
        * Returns the number of instances
        * currently borrowed from but not yet returned 
        * to my pool corresponding to the
  -     * given <i>key</i>.
  +     * given <i>key</i> (optional operation).
        * Throws {@link UnsupportedOperationException}
        * if this information is not available.
        *
  @@ -154,60 +154,62 @@
        * @return the number of instances corresponding to the given <i>key</i> currently borrowed in my pool
        * @throws UnsupportedOperationException when this implementation doesn't support the operation
        */
  -    public abstract int numActive(Object key) throws UnsupportedOperationException;
  +    int numActive(Object key) throws UnsupportedOperationException;
   
       /**
        * Returns the total number of instances
  -     * currently idle in my pool.
  +     * currently idle in my pool (optional operation).
        * Throws {@link UnsupportedOperationException}
        * if this information is not available.
        *
        * @return the total number of instances currently idle in my pool
        * @throws UnsupportedOperationException when this implementation doesn't support the operation
        */
  -    public abstract int numIdle() throws UnsupportedOperationException;
  +    int numIdle() throws UnsupportedOperationException;
   
       /**
        * Returns the total number of instances
        * current borrowed from my pool but not
  -     * yet returned.
  +     * yet returned (optional operation).
        * Throws {@link UnsupportedOperationException}
        * if this information is not available.
        *
        * @return the total number of instances currently borrowed from my pool
        * @throws UnsupportedOperationException when this implementation doesn't support the operation
        */
  -    public abstract int numActive() throws UnsupportedOperationException;
  +    int numActive() throws UnsupportedOperationException;
   
       /**
  -     * Clears my pool, removing all pooled instances.
  +     * Clears my pool, removing all pooled instances
  +     * (optional operation).
        * Throws {@link UnsupportedOperationException}
        * if the pool cannot be cleared.
        * @throws UnsupportedOperationException when this implementation doesn't support the operation
        */
  -    public abstract void clear() throws Exception, UnsupportedOperationException;
  +    void clear() throws Exception, UnsupportedOperationException;
   
       /**
  -     * Clears the specified pool, removing all pooled instances
  -     * corresponding to the given <i>key</i>.
  +     * Clears the specified pool, removing all
  +     * pooled instances corresponding to
  +     * the given <i>key</i>  (optional operation).
        * Throws {@link UnsupportedOperationException}
        * if the pool cannot be cleared.
        * @param key the key to clear
        * @throws UnsupportedOperationException when this implementation doesn't support the operation
        */
  -    public abstract void clear(Object key) throws Exception, UnsupportedOperationException;
  +    void clear(Object key) throws Exception, UnsupportedOperationException;
   
       /**
        * Close this pool, and free any resources associated with it.
        */
  -    public abstract void close() throws Exception;
  +    void close() throws Exception;
   
       /**
        * Sets the {@link KeyedPoolableObjectFactory factory} I use
  -     * to create new instances.
  +     * to create new instances (optional operation).
        * @param factory the {@link KeyedPoolableObjectFactory} I use to create new instances.
        * @throws IllegalStateException when the factory cannot be set at this time
        * @throws UnsupportedOperationException when this implementation doesn't support the operation
        */
  -    public abstract void setFactory(KeyedPoolableObjectFactory factory) throws IllegalStateException, UnsupportedOperationException;
  +    void setFactory(KeyedPoolableObjectFactory factory) throws IllegalStateException, UnsupportedOperationException;
   }
  
  
  
  1.3       +5 -5      jakarta-commons/pool/src/java/org/apache/commons/pool/KeyedObjectPoolFactory.java
  
  Index: KeyedObjectPoolFactory.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/pool/src/java/org/apache/commons/pool/KeyedObjectPoolFactory.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- KeyedObjectPoolFactory.java	15 Jan 2002 00:07:03 -0000	1.2
  +++ KeyedObjectPoolFactory.java	1 May 2002 04:54:52 -0000	1.3
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-commons/pool/src/java/org/apache/commons/pool/KeyedObjectPoolFactory.java,v 1.2 2002/01/15 00:07:03 rwaldhoff Exp $
  - * $Revision: 1.2 $
  - * $Date: 2002/01/15 00:07:03 $
  + * $Header: /home/cvs/jakarta-commons/pool/src/java/org/apache/commons/pool/KeyedObjectPoolFactory.java,v 1.3 2002/05/01 04:54:52 rwaldhoff Exp $
  + * $Revision: 1.3 $
  + * $Date: 2002/05/01 04:54:52 $
    *
    * ====================================================================
    *
  @@ -65,7 +65,7 @@
    * A factory for creating {@link KeyedObjectPool}s.
    *
    * @author Rodney Waldhoff
  - * @version $Revision: 1.2 $ $Date: 2002/01/15 00:07:03 $ 
  + * @version $Revision: 1.3 $ $Date: 2002/05/01 04:54:52 $ 
    *
    * @see KeyedObjectPool
    */
  @@ -74,5 +74,5 @@
        * Create a new {@link KeyedObjectPool}.
        * @return a new {@link KeyedObjectPool}
        */
  -    public abstract KeyedObjectPool createPool();
  +    KeyedObjectPool createPool();
   }
  
  
  
  1.3       +5 -5      jakarta-commons/pool/src/java/org/apache/commons/pool/ObjectPoolFactory.java
  
  Index: ObjectPoolFactory.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/pool/src/java/org/apache/commons/pool/ObjectPoolFactory.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ObjectPoolFactory.java	15 Jan 2002 00:07:03 -0000	1.2
  +++ ObjectPoolFactory.java	1 May 2002 04:54:52 -0000	1.3
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-commons/pool/src/java/org/apache/commons/pool/ObjectPoolFactory.java,v 1.2 2002/01/15 00:07:03 rwaldhoff Exp $
  - * $Revision: 1.2 $
  - * $Date: 2002/01/15 00:07:03 $
  + * $Header: /home/cvs/jakarta-commons/pool/src/java/org/apache/commons/pool/ObjectPoolFactory.java,v 1.3 2002/05/01 04:54:52 rwaldhoff Exp $
  + * $Revision: 1.3 $
  + * $Date: 2002/05/01 04:54:52 $
    *
    * ====================================================================
    *
  @@ -65,7 +65,7 @@
    * A factory interface for creating {@link ObjectPool}s.
    *
    * @author Rodney Waldhoff
  - * @version $Revision: 1.2 $ $Date: 2002/01/15 00:07:03 $ 
  + * @version $Revision: 1.3 $ $Date: 2002/05/01 04:54:52 $ 
    *
    * @see ObjectPool
    */
  @@ -74,5 +74,5 @@
        * Create and return a new {@link ObjectPool}.
        * @return a new {@link ObjectPool}
        */
  -    public abstract ObjectPool createPool();
  +    ObjectPool createPool();
   }
  
  
  
  1.4       +9 -9      jakarta-commons/pool/src/java/org/apache/commons/pool/PoolableObjectFactory.java
  
  Index: PoolableObjectFactory.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/pool/src/java/org/apache/commons/pool/PoolableObjectFactory.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- PoolableObjectFactory.java	17 Mar 2002 14:55:21 -0000	1.3
  +++ PoolableObjectFactory.java	1 May 2002 04:54:52 -0000	1.4
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-commons/pool/src/java/org/apache/commons/pool/PoolableObjectFactory.java,v 1.3 2002/03/17 14:55:21 rwaldhoff Exp $
  - * $Revision: 1.3 $
  - * $Date: 2002/03/17 14:55:21 $
  + * $Header: /home/cvs/jakarta-commons/pool/src/java/org/apache/commons/pool/PoolableObjectFactory.java,v 1.4 2002/05/01 04:54:52 rwaldhoff Exp $
  + * $Revision: 1.4 $
  + * $Date: 2002/05/01 04:54:52 $
    *
    * ====================================================================
    *
  @@ -100,7 +100,7 @@
    * </ol>
    *
    * @author Rodney Waldhoff
  - * @version $Revision: 1.3 $ $Date: 2002/03/17 14:55:21 $ 
  + * @version $Revision: 1.4 $ $Date: 2002/05/01 04:54:52 $ 
    *
    * @see ObjectPool
    */
  @@ -109,13 +109,13 @@
      * Creates an instance that can be returned by the pool.
      * @return an instance that can be returned by the pool.
      */
  -  public abstract Object makeObject() throws Exception;
  +  Object makeObject() throws Exception;
   
     /**
      * Destroys an instance no longer needed by the pool.
      * @param obj the instance to be destroyed
      */
  -  public abstract void destroyObject(Object obj) throws Exception;
  +  void destroyObject(Object obj) throws Exception;
   
     /**
      * Ensures that the instance is safe to be returned by the pool.
  @@ -124,17 +124,17 @@
      * @return <tt>false</tt> if this <i>obj</i> is not valid and should
      *         be dropped from the pool, <tt>true</tt> otherwise.
      */
  -  public abstract boolean validateObject(Object obj);
  +  boolean validateObject(Object obj);
   
     /**
      * Reinitialize an instance to be returned by the pool.
      * @param obj the instance to be activated
      */
  -  public abstract void activateObject(Object obj) throws Exception;
  +  void activateObject(Object obj) throws Exception;
   
     /**
      * Uninitialize an instance to be returned to the pool.
      * @param obj the instance to be passivated
      */
  -  public abstract void passivateObject(Object obj) throws Exception;
  +  void passivateObject(Object obj) throws Exception;
   }
  
  
  

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>