You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avalon.apache.org by Berin Loritsch <bl...@apache.org> on 2002/09/26 03:05:54 UTC

Mpool support for Recyclable (was RE: cvs commit: jakarta-avalon-excalibur/event/src/java/org/apache/excalibur/mpool PoolUtil.java FixedSizePool.java VariableSizePool.java BlockingFixedSizePool.java)

Fixed.

I have the Recyclable/Resettable set up this way:

if the Object implements Resettable, it will call the "reset()"
method.

If the "org.apache.avalon.excalibur.pool.Recyclable" class
is assignable from the Object's class we invoke the "recycle()"
method.

Otherwise we leave the class alone.

> -----Original Message-----
> From: Berin Loritsch [mailto:bloritsch@apache.org] 
> Sent: Wednesday, September 25, 2002 7:42 PM
> To: 'Avalon Developers List'
> Subject: RE: cvs commit: 
> jakarta-avalon-excalibur/event/src/java/org/apache/excalibur/m
> pool PoolUtil.java FixedSizePool.java VariableSizePool.java 
> BlockingFixedSizePool.java
> 
> 
> > From: Peter Donald [mailto:peter@apache.org] 
> > 
> > On Thu, 26 Sep 2002 01:47, bloritsch@apache.org wrote:
> > >   1.1                 
> > > 
> > jakarta-avalon-excalibur/event/src/java/org/apache/excalibur/m
> > pool/PoolUtil
> > >.java
> > >
> > >   Index: PoolUtil.java
> > >   
> > ===================================================================
> > >   /*
> > >    * Created by IntelliJ IDEA.
> > >    * User: bloritsch
> > >    * Date: Sep 25, 2002
> > >    * Time: 11:47:49 AM
> > >    * To change template for new class use
> > >    * Code Style | Class Templates options (Tools | IDE Options).
> > >    */
> > 
> > LICENSE!
> 
> Oops.  (As you can see I have an early adopters version of IDEA)
> 
> Will fix ASAP.
> 
> > 
> > 
> > I would prefer that you checked if it implemented Recyclable 
> > class (also by 
> > reflection). The reason being that I have classes that have a 
> > recycle method 
> > that are not Recyclable.
> 
> Hmm.  We need to support the Recyclable interface from the old Pool
> package
> without an artificial dependency for one class....
> 
> So we can choose to use a particular "recycle" method even if it is
> "reset" or whatever using pure reflection.  Any thoughts on how to
> satisfy it without crazy dependency checks?
> 
> I can add the check for the "Recycle" interface as well.  How do you
> feel about a "Resettable" interface for MPool, which will allow
> PoolUtil to check for the Resettable interface or the old Recyclable
> interface.  That way we can make them both work....
> 
> 
> --
> To unsubscribe, e-mail:   
> <mailto:avalon-dev-> unsubscribe@jakarta.apache.org>
> For 
> additional commands, 
> e-mail: <ma...@jakarta.apache.org>
> 


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