org.mule.util
Interface ObjectPool

All Known Implementing Classes:
CommonsPoolProxyPool

public interface ObjectPool

ObjectPool is a simple pooling interface for objects

Version:
$Revision: 1.3 $
Author:
Ross Mason

Field Summary
static int DEFAULT_EXHAUSTED_ACTION
           
static int DEFAULT_MAX_SIZE
           
static int DEFAULT_MAX_WAIT
           
static int WHEN_EXHAUSTED_BLOCK
           
static int WHEN_EXHAUSTED_FAIL
          Constants used to determine the exhaused action of the pool
static int WHEN_EXHAUSTED_GROW
           
 
Method Summary
 java.lang.Object borrowObject()
           
 void clearPool()
           
 int getMaxSize()
           
 int getSize()
           
 void onAdd(java.lang.Object obj)
           
 void onRemove(java.lang.Object obj)
           
 void returnObject(java.lang.Object object)
           
 void setFactory(ObjectFactory factory)
           
 void start()
           
 void stop()
           
 

Field Detail

WHEN_EXHAUSTED_FAIL

public static final int WHEN_EXHAUSTED_FAIL
Constants used to determine the exhaused action of the pool

See Also:
Constant Field Values

WHEN_EXHAUSTED_BLOCK

public static final int WHEN_EXHAUSTED_BLOCK
See Also:
Constant Field Values

WHEN_EXHAUSTED_GROW

public static final int WHEN_EXHAUSTED_GROW
See Also:
Constant Field Values

DEFAULT_MAX_SIZE

public static final int DEFAULT_MAX_SIZE
See Also:
Constant Field Values

DEFAULT_MAX_WAIT

public static final int DEFAULT_MAX_WAIT
See Also:
Constant Field Values

DEFAULT_EXHAUSTED_ACTION

public static final int DEFAULT_EXHAUSTED_ACTION
See Also:
Constant Field Values
Method Detail

borrowObject

public java.lang.Object borrowObject()
                              throws java.lang.Exception
Throws:
java.lang.Exception

returnObject

public void returnObject(java.lang.Object object)
                  throws java.lang.Exception
Throws:
java.lang.Exception

getSize

public int getSize()

getMaxSize

public int getMaxSize()

setFactory

public void setFactory(ObjectFactory factory)

clearPool

public void clearPool()

start

public void start()
           throws java.lang.Exception
Throws:
java.lang.Exception

stop

public void stop()
          throws java.lang.Exception
Throws:
java.lang.Exception

onAdd

public void onAdd(java.lang.Object obj)

onRemove

public void onRemove(java.lang.Object obj)


Copyright © 2003-2005 SymphonySoft Limited. All Rights Reserved.