public class GrobidPoolingFactory extends AbstractEngineFactory
| Modifier | Constructor and Description |
|---|---|
protected |
GrobidPoolingFactory()
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
activateObject(java.lang.Object arg0) |
void |
destroyObject(java.lang.Object arg0) |
static Engine |
getEngineFromPool(boolean preloadModels)
Obtains an instance from this pool.
By contract, clients must call returnEngine(org.grobid.core.engines.Engine)
when they finish to use the engine. |
java.lang.Object |
makeObject() |
protected static GrobidPoolingFactory |
newInstance()
Creates and returns an instance of GROBIDFactory.
|
protected static GenericObjectPool |
newPoolInstance()
Creates a pool for
Engine objects. |
void |
passivateObject(java.lang.Object arg0) |
static void |
returnEngine(Engine engine)
By contract, engine must have been obtained using
getEngineFromPool(boolean). |
boolean |
validateObject(java.lang.Object arg0) |
createEngine, createEngine, fullInit, getEngine, getEngine, initprotected static GenericObjectPool newPoolInstance()
Engine objects. So a number of objects is
always available and ready to start immediatly.public static Engine getEngineFromPool(boolean preloadModels)
returnEngine(org.grobid.core.engines.Engine)
when they finish to use the engine.public static void returnEngine(Engine engine)
getEngineFromPool(boolean).protected static GrobidPoolingFactory newInstance()
public void activateObject(java.lang.Object arg0)
throws java.lang.Exception
java.lang.Exceptionpublic void destroyObject(java.lang.Object arg0)
throws java.lang.Exception
java.lang.Exceptionpublic java.lang.Object makeObject()
throws java.lang.Exception
java.lang.Exceptionpublic void passivateObject(java.lang.Object arg0)
throws java.lang.Exception
java.lang.Exceptionpublic boolean validateObject(java.lang.Object arg0)