|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--dtw.webmail.util.CastorDatabasePool
Class that implements a pool for CastorDatabase
instances.
The factory method is used for creating pools of the
given database and size, using the database's factory method
to create the requested amount of instances.
| Method Summary | |
void |
clear()
Removes all CastorDatabase references from this pool. |
static CastorDatabasePool |
createCastorDatabasePool(int size,
CastorDatabase database)
Creates a CastorDatabasePool with the given size, containing the given CastorDatabase instances. |
int |
getCeiling()
Returns the ceiling (in terms of size) of this pool. |
protected void |
initPool()
Initializes a pool of CastorDatabases instances. |
CastorDatabase |
leaseDatabase()
Returns a leased CastorDatabase instance from this pool. |
void |
releaseDatabase(CastorDatabase database)
Releases a formerly leased CastorDatabase, returning it into this pool. |
void |
resize(int size)
Resizes the pool. |
int |
size()
Returns the size of this pool. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
public CastorDatabase leaseDatabase()
public void releaseDatabase(CastorDatabase database)
database - the formerly leased CastorDatabase
to be released.public int getCeiling()
public int size()
public void resize(int size)
size - the new size as int.public void clear()
protected void initPool()
public static CastorDatabasePool createCastorDatabasePool(int size,
CastorDatabase database)
size - the size as int.
|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||