Package org.apache.uima.internal.util
Class TextAnalysisEnginePool
- java.lang.Object
-
- org.apache.uima.internal.util.AnalysisEnginePool
-
- org.apache.uima.internal.util.TextAnalysisEnginePool
-
@Deprecated public class TextAnalysisEnginePool extends AnalysisEnginePool
Deprecated.As of v2.0, useAnalysisEnginePool
instead.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
Constructors Constructor Description TextAnalysisEnginePool(java.lang.String aName, int aNumInstances, ResourceSpecifier aResourceSpecifier)
Deprecated.Creates a new TextAnalysisEnginePool.TextAnalysisEnginePool(java.lang.String aName, int aNumInstances, ResourceSpecifier aResourceSpecifier, java.util.Map<java.lang.String,java.lang.Object> aResourceInitParams)
Deprecated.Creates a new TextAnalysisEnginePool.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected java.lang.Class
getResourceClass()
Deprecated.Gets the class of Resource contained in this pool - by default this isAnalysisEngine
, but subclasses may override.TextAnalysisEngine
getTAE()
Deprecated.Checks out a TextAnalysisEngine from the pool.TextAnalysisEngine
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 Detail
-
TextAnalysisEnginePool
public TextAnalysisEnginePool(java.lang.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(java.lang.String aName, int aNumInstances, ResourceSpecifier aResourceSpecifier, java.util.Map<java.lang.String,java.lang.Object> aResourceInitParams) 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 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 Detail
-
getTAE
public TextAnalysisEngine 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
public void releaseTAE(TextAnalysisEngine aTAE)
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
public TextAnalysisEngine getTAE(long aTimeout)
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
protected java.lang.Class 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.getResourceClass()
-
-