|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.ebmwebsourcing.easycommons.xml.DocumentBuilderResourcePool
public class DocumentBuilderResourcePool
This class represent a DocumentBuilder pool, which provided DocumentBuilder
object as resource.
| Constructor Summary | |
|---|---|
DocumentBuilderResourcePool(int minPoolSize,
int maxPoolSize,
PoolPolicy poolPolicy)
Allowing to instantiate a new DocumentBuilderResourcePool containing DocumentBuilder resources. |
|
| Method Summary | |
|---|---|
void |
release(javax.xml.parsers.DocumentBuilder documentBuilder)
Release the specified DocumentBuilder After putting back the
DocumentBuilder in the pool, the method onRelease() of the
resource DocumentBuilder resource handler is called. |
javax.xml.parsers.DocumentBuilder |
take()
Take one unused DocumentBuilder in the current pool. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DocumentBuilderResourcePool(int minPoolSize,
int maxPoolSize,
PoolPolicy poolPolicy)
DocumentBuilderResourcePool containing DocumentBuilder resources.
minPoolSize - The minimum number of DocumentBuilder instances in the pool (created at the
initialization).maxPoolSize - the maximum number of DocumentBuilder instances in the current pool (limit of the
pool). It must be greater or equals to the specified minSize.
The maximum value is Integer.MAX_VALUEpoolPolicy - the PoolPolicy to adopt when the maximum size is reached. it
must not be null.| Method Detail |
|---|
public javax.xml.parsers.DocumentBuilder take()
DocumentBuilder in the current pool. After
getting a DocumentBuilder from the pool and before returning
a DocumentBuilder, the method onTake() of the
DocumentBuilder resource handler is called.
DocumentBuilder
PoolException - if the current thread is interrupted for the pool policy WAIT
or if there is no more available resource in the pool for the
pool policy REJECTpublic final void release(javax.xml.parsers.DocumentBuilder documentBuilder)
DocumentBuilder After putting back the
DocumentBuilder in the pool, the method onRelease() of the
resource DocumentBuilder resource handler is called.
documentBuilder - The DocumentBuilder to release
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||