|
||||||||||
| 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 java.util.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(java.lang.Object o)
But a connection back into the pool. |
protected java.lang.Object |
get()
Get a connection from the pool. |
protected java.util.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 java.util.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 java.lang.Object get()
throws java.lang.InterruptedException,
javax.jcr.RepositoryException
java.lang.InterruptedException
javax.jcr.RepositoryException
protected void add(java.lang.Object o)
throws java.lang.InterruptedException
o - the connection
java.lang.InterruptedExceptionprotected java.util.ArrayList getAll()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||