In many parts of the runtime, we need to pool instances of objects that
are expensive to create (such as JAXB objects, StAX parsers, {_at_link
Pipe} instances.
This class provides a default implementation of such a pool.
The design of the Pool itself should be stable enough, but it would be
great if someone can rewrite the implementation.
Currently it's implemented by using ConcurrentLinkedQueue, and it has a
few problems:
- First, we don't need FIFO semantics, and I think using LinkedList as
the underlying data structure isn't particularly memory efficient.
- The pool never shrinks.
--
Kohsuke Kawaguchi
Sun Microsystems kohsuke.kawaguchi_at_sun.com