On Wed, Dec 22, 2010 at 9:42 AM, Simone Tripodi <simone.trip...@gmail.com>wrote:

> Hi all mates,
> I'd like to propose a small stuff reorganization in the `impl` package
> that is growing up and we could arrange stuff in a cleaner way.
> I propose the following packages:
>
> org.apache.commons.pool2.impl
>                                           |---- generic
>                                           |---- reference
>                                           |---- stack
>
> common stuff could be included directly under impl.
>

What exactly would that be?

>
> Moreover since we've the SoftReference pool implementation, I propose
> to add a full set of java.lang.ref.Reference pool implementation, the
> current one could become an abstract class using data structures of
> java.lang.ref.Reference references, subclass just provide
> PhantomReference, SoftReference and WeakReference specialization.
> WDYT? Many thanks in advance for feedbacks/suggestions.
>

I was going to propose dropping the stack pools altogether.  The LIFO/FIFO
config option in the generic pools makes them mostly irrelevant (i.e., you
can get the same behavior with a suitably configured GOP / GKOP with much
more configurability)

I don't want to sound too conservative and I will certainly not stand in the
way of new / different pool implementations, but I would personally prefer
to keep the number of included pool impls as small as possible.

I think the first thing we need to do is to decide what implementations we
are going to a) keep or b) add for 2.0.  I have been convinced that we need
to keep GKOP as well as GOP.  As I said above, I would like to consider
dropping the stack-based pools.  I think we should keep the reference-based
pool and I am open to the new ones you suggest, just don't have use cases
myself for them.  There are quite a few impls buried in PoolUtils that might
make sense to pull out (or eliminate).

What might make sense is to replace "impl" with "instance" (or "object") and
"reference" (or "ref").  So you have o.a.c.p, o.a.c.p.instance,
o.a.c.p.reference.


> Simo
>
> PS In the meantime, I'm taking care of removing synchronized methods
> and making fields volatile, please review when having spare time! :)
>

Thanks!

Phil

> Have a nice day,
> Simo
>
> http://people.apache.org/~simonetripodi/<http://people.apache.org/%7Esimonetripodi/>
> http://www.99soft.org/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
> For additional commands, e-mail: dev-h...@commons.apache.org
>
>

Reply via email to