Class ResourcePoolFactory

  • Direct Known Subclasses:
    BasicResourcePoolFactory

    public abstract class ResourcePoolFactory
    extends java.lang.Object

    A Factory for ResourcePools. ResourcePoolFactories may manage resources (usually threads that perform maintenance tasks) that are shared by all pools that they create. Clients who require a large number of pools may wish to create their own factory instances rather than using the shared instance to control the degree of resource (Thread) sharing among pools.

    Factories should (and the default implementation does) be careful to ensure that factories keep resources open only while there are active ResourcePools that they have created.

    Subclasses must mark all methods synchronized so that clients may reliably use shared factories to do stuff like...

         synchronized (factory)
         {
             factory.setMin(8);
             factory.setMax(24);
             ResourcePool rp = factory.createPool();
         }