|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.jackrabbit.core.data.db.Pool
public class Pool
Implementation of a simple ConnectionRecoveryManager pool. The maximum number of pooled objects can be set, and if more objects are requested the pool waits until one object is put back.
Field Summary | |
---|---|
protected ArrayList |
all
|
protected DbDataStore |
factory
|
protected int |
maxSize
|
protected EDU.oswego.cs.dl.util.concurrent.LinkedQueue |
pool
|
Constructor Summary | |
---|---|
protected |
Pool(DbDataStore factory,
int maxSize)
Create a new pool using the given factory and maximum pool size. |
Method Summary | |
---|---|
protected void |
add(Object o)
But a connection back into the pool. |
protected Object |
get()
Get a connection from the pool. |
protected ArrayList |
getAll()
Get all connections (even if they are currently being used). |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected final int maxSize
protected final ArrayList all
protected final DbDataStore factory
protected final EDU.oswego.cs.dl.util.concurrent.LinkedQueue pool
Constructor Detail |
---|
protected Pool(DbDataStore factory, int maxSize)
factory
- the db data storemaxSize
- the maximum number of objects in the pool.Method Detail |
---|
protected Object get() throws InterruptedException, RepositoryException
InterruptedException
RepositoryException
protected void add(Object o) throws InterruptedException
o
- the connection
InterruptedException
protected ArrayList getAll()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |