Package org.apache.uima.internal.util
Class TextAnalysisEnginePool
java.lang.Object
org.apache.uima.internal.util.AnalysisEnginePool
org.apache.uima.internal.util.TextAnalysisEnginePool
Deprecated.
A pool of Text Analysis Engines, which supports reconfiguration. This is not part of the stable
UIMA API and may change in future releases.
-
Constructor Summary
ConstructorDescriptionTextAnalysisEnginePool
(String aName, int aNumInstances, ResourceSpecifier aResourceSpecifier) Deprecated.Creates a new TextAnalysisEnginePool.TextAnalysisEnginePool
(String aName, int aNumInstances, ResourceSpecifier aResourceSpecifier, Map<String, Object> aResourceInitParams) Deprecated.Creates a new TextAnalysisEnginePool. -
Method Summary
Modifier and TypeMethodDescriptionprotected Class
Deprecated.Gets the class of Resource contained in this pool - by default this isAnalysisEngine
, but subclasses may override.getTAE()
Deprecated.Checks out a TextAnalysisEngine from the pool.getTAE
(long aTimeout) Deprecated.Checks out a TextAnalysisEngine from the pool.void
releaseTAE
(TextAnalysisEngine aTAE) Deprecated.Checks in a TAE to the pool.Methods inherited from class org.apache.uima.internal.util.AnalysisEnginePool
batchProcessComplete, collectionProcessComplete, destroy, getAnalysisEngine, getAnalysisEngine, getMetaData, getSize, reconfigure, releaseAnalysisEngine, setLogger, setResultSpecification
-
Constructor Details
-
TextAnalysisEnginePool
public TextAnalysisEnginePool(String aName, int aNumInstances, ResourceSpecifier aResourceSpecifier) throws ResourceInitializationException Deprecated.Creates a new TextAnalysisEnginePool.- Parameters:
aName
- the pool nameaNumInstances
- the number of Resource instances in the poolaResourceSpecifier
- specifier that describes how to create the Resource instances for the pool- Throws:
ResourceInitializationException
- if the Resource instances could not be created
-
TextAnalysisEnginePool
public TextAnalysisEnginePool(String aName, int aNumInstances, ResourceSpecifier aResourceSpecifier, Map<String, Object> aResourceInitParams) throws ResourceInitializationExceptionDeprecated.Creates a new TextAnalysisEnginePool.- Parameters:
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 toResource.initialize(ResourceSpecifier, Map)
methods. May be null if there are no parameters.- Throws:
ResourceInitializationException
- if the Resource instances could not be created
-
-
Method Details
-
getTAE
Deprecated.Checks out a TextAnalysisEngine from the pool.- Returns:
- a TAE for use by the client. Returns
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).
-
releaseTAE
Deprecated.Checks in a TAE to the pool. Also notifies other Threads that may be waiting for a connection.- Parameters:
aTAE
- the resource to release
-
getTAE
Deprecated.Checks out a TextAnalysisEngine from the pool. If none is currently available, wait for the specified amount of time for one to be checked in.- Parameters:
aTimeout
- the time to wait in milliseconds. A value of <=0 will wait forever.- Returns:
- a TAE for use by the client. Returns
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).
-
getResourceClass
Deprecated.Description copied from class:AnalysisEnginePool
Gets the class of Resource contained in this pool - by default this isAnalysisEngine
, but subclasses may override.- Overrides:
getResourceClass
in classAnalysisEnginePool
- Returns:
- class of Resource contained in this pool
- See Also:
-
AnalysisEnginePool
instead.