|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.uima.internal.util.AnalysisEnginePool
public class AnalysisEnginePool
A pool of Analysis Engines, which supports reconfiguration. This is not part of the stable UIMA API and may change in future releases.
Constructor Summary | |
---|---|
AnalysisEnginePool(java.lang.String aName,
int aNumInstances,
ResourceSpecifier aResourceSpecifier)
Creates a new AnalysisEnginePool. |
|
AnalysisEnginePool(java.lang.String aName,
int aNumInstances,
ResourceSpecifier aResourceSpecifier,
java.util.Map<java.lang.String,java.lang.Object> aResourceInitParams)
Creates a new AnalysisEnginePool. |
Method Summary | |
---|---|
void |
batchProcessComplete()
Calls batchProcessComplete on all AEs in pool. |
void |
collectionProcessComplete()
Calls collectionProcessComplete on all AEs in pool. |
void |
destroy()
Destroys all AnalysisEngines in this pool. |
AnalysisEngine |
getAnalysisEngine()
Checks out an AnalysisEngine from the pool. |
AnalysisEngine |
getAnalysisEngine(long aTimeout)
Checks out an AnalysisEngine from the pool. |
AnalysisEngineMetaData |
getMetaData()
Gets metadata for AnalysisEngines in this pool. |
protected java.lang.Class<AnalysisEngine> |
getResourceClass()
Gets the class of Resource contained in this pool - by default this is AnalysisEngine , but subclasses may override. |
int |
getSize()
Returns the size of this pool - the total number of AnalysisEngine instances it would contain if no instances were checked out. |
void |
reconfigure()
|
void |
releaseAnalysisEngine(AnalysisEngine aAE)
Checks in an AnalysisEngine to the pool. |
void |
setLogger(Logger aLogger)
Sets logger for all AnalysisEngines in pool. |
void |
setResultSpecification(ResultSpecification aResultSpec)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AnalysisEnginePool(java.lang.String aName, int aNumInstances, ResourceSpecifier aResourceSpecifier) throws ResourceInitializationException
aName
- the pool nameaNumInstances
- the number of Resource instances in the poolaResourceSpecifier
- specifier that describes how to create the Resource instances for the pool
ResourceInitializationException
- if the Resource instances could not be createdpublic AnalysisEnginePool(java.lang.String aName, int aNumInstances, ResourceSpecifier aResourceSpecifier, java.util.Map<java.lang.String,java.lang.Object> aResourceInitParams) throws ResourceInitializationException
aName
- the pool nameaNumInstances
- the number of Resource instances in the poolaResourceSpecifier
- specifier that describes how to create the Resource instances for the poolaResourceInitParams
- additional parameters to be passed to
Resource.initialize(ResourceSpecifier,Map)
methods. May be null if there are
no parameters.
ResourceInitializationException
- if the Resource instances could not be createdMethod Detail |
---|
public AnalysisEngine getAnalysisEngine()
null
if none are
available (in which case the client may wait on this object in order to be notified
when an instance becomes available).public void releaseAnalysisEngine(AnalysisEngine aAE)
aResource
- the resource to releasepublic AnalysisEngine getAnalysisEngine(long aTimeout)
aTimeout
- the time to wait in milliseconds. A value of <=0 will wait forever.
null
if none are
available (in which case the client may wait on this object in order to be notified
when an instance becomes available).public void destroy()
public AnalysisEngineMetaData getMetaData()
public void setResultSpecification(ResultSpecification aResultSpec)
This version only called for setResultSpecification called from an appl on the
MultiprocessingAnalysisEngine directly. process(cas, result-spec) calls
setResultSpecification on the individual analysis engine from the pool.
public void reconfigure() throws ResourceConfigurationException
ResourceConfigurationException
org.apache.uima.analysis_engine.MultithreadableAnalysisEngine#reconfigure()
public void batchProcessComplete() throws AnalysisEngineProcessException
AnalysisEngineProcessException
public void collectionProcessComplete() throws AnalysisEngineProcessException
AnalysisEngineProcessException
public int getSize()
public void setLogger(Logger aLogger)
protected java.lang.Class<AnalysisEngine> getResourceClass()
AnalysisEngine
, but subclasses may override.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |