org.apache.excalibur.mpool
Class DefaultPoolManager

java.lang.Object
  extended by org.apache.excalibur.mpool.DefaultPoolManager
All Implemented Interfaces:
org.apache.excalibur.mpool.PoolManager

public class DefaultPoolManager
extends java.lang.Object
implements org.apache.excalibur.mpool.PoolManager

This interface is for a PoolManager that creates pools that are managed asynchronously. The contract is that the controller type is specified in the constructor.

Since:
4.1
Version:
CVS $Revision: 1.4 $ $Date: 2004/02/28 11:47:34 $
Author:
Avalon Development Team

Nested Class Summary
private static class DefaultPoolManager.PoolManagerCommand
           
 
Field Summary
private  java.util.Map m_factoryMap
           
private  java.util.Random m_keyGenerator
           
private  java.util.Map m_keyMap
           
 
Fields inherited from interface org.apache.excalibur.mpool.PoolManager
ROLE
 
Constructor Summary
DefaultPoolManager()
           
DefaultPoolManager(org.apache.excalibur.event.Sink commandSink)
           
 
Method Summary
private  long getKey()
          Return a new key for the pool and controller.
 org.apache.excalibur.mpool.Pool getManagedPool(org.apache.excalibur.mpool.ObjectFactory factory, int initialEntries)
          Return a managed pool that has a controller.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.excalibur.mpool.PoolManager
 

Field Detail

m_keyGenerator

private final java.util.Random m_keyGenerator

m_keyMap

private final java.util.Map m_keyMap

m_factoryMap

private final java.util.Map m_factoryMap
Constructor Detail

DefaultPoolManager

public DefaultPoolManager()

DefaultPoolManager

public DefaultPoolManager(org.apache.excalibur.event.Sink commandSink)
Method Detail

getManagedPool

public org.apache.excalibur.mpool.Pool getManagedPool(org.apache.excalibur.mpool.ObjectFactory factory,
                                                      int initialEntries)
                                               throws java.lang.Exception
Return a managed pool that has a controller.

Specified by:
getManagedPool in interface org.apache.excalibur.mpool.PoolManager
Throws:
java.lang.Exception

getKey

private final long getKey()
Return a new key for the pool and controller.