Interface CpeDescription

    • Method Detail

      • addCollectionReader

        CpeCollectionReader addCollectionReader​(String aCollectionReaderPath)
                                         throws CpeDescriptorException
        Adds a path to the descriptor file containing CollectionReader's configuration. The CPE supports only one CollectionReader instance.

        This method causes the CPE descriptor to use the older <include> syntax. To use the <import> syntax, you must use addCollectionReader(CpeCollectionReader) instead.

        Parameters:
        aCollectionReaderPath - - path to the CollectionReader descriptor. A relative path is interpreted as relative to the current working directory.
        Returns:
        CpeCollectionReader
        Throws:
        CpeDescriptorException - tbd
      • getCpeConfiguration

        CpeConfiguration getCpeConfiguration()
                                      throws CpeDescriptorException
        Returns the CPE configuration that includes:
        • An ID of the entity to begin processing with (OPTIONAL)
        • Number of entities to process
        • Checkpoint definition (checkpoint file, frequency)
        • A name of the class implementing UimaTimer interface.
        • Startup mode for the CPE (immediate, interactive, vinciService)

        Using an instance of CpeConfiguration the client may change behavior of the CPE and corresponding to each of the elements in the above list.

        Returns:
        CpeConfiguration
        Throws:
        CpeDescriptorException - tbd
      • setInputQueueSize

        void setInputQueueSize​(int aSize)
                        throws CpeDescriptorException
        Defines the size for the InputQueue. This queue is used by the CPE to store bundles of CAS as read by a CollectionReader. The queue is shared between the CollectionReader and ProcessingUnits. The larger the size of this queue the more bundles of CAS are placed in the queue, and the more memory is consumed by the CPE. The right size for this queue depends on number of factors, like the speed of analysis and available memory.
        Parameters:
        aSize - - size of the queue
        Throws:
        CpeDescriptorException - tbd
      • setOutputQueueSize

        void setOutputQueueSize​(int aSize)
                         throws CpeDescriptorException
        Defines the size for the OutputQueue. This queue is used by the CPE to store bundles of CAS containing results of analysis. The queue is shared between ProcessingUnits and CasConsumers. The larger the size of this queue the more bundles of CAS are placed in the queue, and the more memory is consumed by the CPE. The right size for this queue depends on number of factors, like the speed in which Cas's are consumed and available memory.
        Parameters:
        aSize - - size of the queue
        Throws:
        CpeDescriptorException - tbd
      • setCheckpoint

        void setCheckpoint​(String aCheckpointFile,
                           int aFrequency)
        Add checkpoint file and frequency (in millis) of checkpoints
        Parameters:
        aCheckpointFile - - path for the checkpoint file
        aFrequency - - frequency in terms of mills for checkpoints
      • setTimer

        void setTimer​(String aTimerClass)
        Add name of the class that implements (@link org.apache.uima.util.UimaTimer} interface. This timer will be used by the CPE to time events.
        Parameters:
        aTimerClass - - name of the UimaTimer class
      • setDeployment

        void setDeployment​(String aDeployMode)
        Define startup mode for the CPE. The three supported options are:
        • immediate (DEFAULT), starts the CPE without user interaction
        • interactive - allows to the user to control the start, stop, pause, resume of the CPE.
        • vinciService - starts the CPM as a Vinci Service
        Parameters:
        aDeployMode - - CPM deployment mode
      • setNumToProcess

        void setNumToProcess​(long aEntityCount)
        Defines number of entities to process by the CPE.
        Parameters:
        aEntityCount - - entity count
      • setStartingEntityId

        void setStartingEntityId​(String aStartEntityId)
        Defines an id of the first entity to process.
        Parameters:
        aStartEntityId - - entity id
      • setResourceManagerConfiguration

        void setResourceManagerConfiguration​(String aResMgrConfPagth)
        Defines the path to Resource Manager Configuration
        Parameters:
        aResMgrConfPagth - - path to Resource Manager Configuration file.
      • setCpeResourceManagerConfiguration

        void setCpeResourceManagerConfiguration​(CpeResourceManagerConfiguration aResMgrConfPagth)
        Defines the path to Resource Manager Configuration
        Parameters:
        aResMgrConfPagth - - path to Resource Manager Configuration file.
      • setCpeCasProcessors

        void setCpeCasProcessors​(CpeCasProcessors aCasProcessors)
      • setCpeConfiguration

        void setCpeConfiguration​(CpeConfiguration aConfiguration)