|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.formaria.pool.PoolManager
public abstract class PoolManager
Manages object pools
Copyright (c) Formaria Ltd. 2008
$Revision: 2.3 $
| Field Summary | |
|---|---|
protected java.util.Vector |
objects
The object pool data store |
| Constructor Summary | |
|---|---|
PoolManager(int size)
Creates a new pool. |
|
| Method Summary | |
|---|---|
void |
closeObjects()
Closes and removes all objects in the pool |
abstract PoolObject |
getNewObject(java.lang.String name)
Construct an new instance of a pooled object |
PoolObject |
getObject(java.lang.String name)
Get a new object from the pool. |
void |
reapObjects()
Removes dead objects from the pool |
void |
returnObject(PoolObject poolObject)
return an object to the pool |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected java.util.Vector objects
| Constructor Detail |
|---|
public PoolManager(int size)
size - the number of objects for the initial pool size| Method Detail |
|---|
public void reapObjects()
public void closeObjects()
public PoolObject getObject(java.lang.String name)
throws java.lang.Exception
name - the name of the resource, for example the connection name
java.lang.Exception - some problem was encounter when trying to get the object. Depends on the specific resource type. Please check this exception
public abstract PoolObject getNewObject(java.lang.String name)
throws java.lang.Exception
name - the name of the new object
java.lang.Exception - problems...public void returnObject(PoolObject poolObject)
poolObject - the object being returned
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||