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, use AnalysisEnginePool 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 Details

    • TextAnalysisEnginePool

      public TextAnalysisEnginePool(String aName, int aNumInstances, ResourceSpecifier aResourceSpecifier) throws ResourceInitializationException
      Deprecated.
      Creates a new TextAnalysisEnginePool.
      Parameters:
      aName - the pool name
      aNumInstances - the number of Resource instances in the pool
      aResourceSpecifier - 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 ResourceInitializationException
      Deprecated.
      Creates a new TextAnalysisEnginePool.
      Parameters:
      aName - the pool name
      aNumInstances - the number of Resource instances in the pool
      aResourceSpecifier - specifier that describes how to create the Resource instances for the pool
      aResourceInitParams - additional parameters to be passed to Resource.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

      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 Class getResourceClass()
      Deprecated.
      Description copied from class: AnalysisEnginePool
      Gets the class of Resource contained in this pool - by default this is AnalysisEngine, but subclasses may override.
      Overrides:
      getResourceClass in class AnalysisEnginePool
      Returns:
      class of Resource contained in this pool
      See Also: