Class CpeCasProcessorsImpl
java.lang.Object
org.apache.uima.resource.metadata.impl.MetaDataObject_impl
org.apache.uima.collection.impl.metadata.cpe.CpeCasProcessorsImpl
- All Implemented Interfaces:
Serializable
,Cloneable
,CpeCasProcessors
,MetaDataObject
,XMLizable
The Class CpeCasProcessorsImpl.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.uima.resource.metadata.impl.MetaDataObject_impl
MetaDataObject_impl.MetaDataAttr, MetaDataObject_impl.SerialContext, MetaDataObject_impl.Serializer
-
Field Summary
Fields inherited from class org.apache.uima.resource.metadata.impl.MetaDataObject_impl
serialContext
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addCpeCasProcessor
(CpeCasProcessor aCasProcessor) Appends new CasProcessor to existing list of CasProcessorsvoid
addCpeCasProcessor
(CpeCasProcessor aCasProcessor, int aInsertPosition) Inserts a new CasProcessor at an indicated position.void
buildFromXMLElement
(Element aElement, XMLParser aParser, XMLParser.ParsingOptions aOptions) Overridden to read Cas Processor attributes.Returns ALLCpeCasProcessor
objects in processing pipeline.int
int
Returns number of ProcessingUnits.getCpeCasProcessor
(int aPosition) ReturnsCpeCasProcessor
found at given position.boolean
int
Returns size of the InputQueue.int
Returns the size of the OutputQueue.int
Gets the pool size.protected AttributesImpl
Overridden to handle Cas Processor attributes.protected XmlizationInfo
To be implemented by subclasses to return information describing how to represent this object in XML.boolean
Checks if is drop cas on exception.void
Removes ALLCpeCasProcessor
objects from processing pipeline.void
removeCpeCasProcessor
(int aPosition) RemovesCpeCasProcessor
object from processing pipeline from a given position.removeCpeCasProcessor
(int aPosition, boolean flag) New API 01/06/2006.void
setAllCpeCasProcessors
(CpeCasProcessor[] aCpeProcessors) Sets the all cpe cas processors.void
setConcurrentPUCount
(int aConcurrentPUCount) Sets ProcessingUnit replication.void
setDropCasOnException
(boolean aDropCasOnException) Sets the drop cas on exception.void
setInputQueueSize
(int aInputQueueSize) Sets the size of the InputQueue.void
setOutputQueueSize
(int aOutputQueueSize) Sets the size of the OutputQueue.void
setPoolSize
(int aPoolSize) void
toXML
(ContentHandler aContentHandler, boolean aWriteDefaultNamespaceAttribute) Writes this object's XML representation by making calls on a SAXContentHandler
.Methods inherited from class org.apache.uima.resource.metadata.impl.MetaDataObject_impl
buildFromXMLElement, clone, equals, getAdditionalAttributes, getAttributeClass, getAttributeValue, getInfoset, getMatchingNode, getPropertyDescriptors, getPropertyXmlInfo, getRelativePathBase, getSerialContext, getSourceUrl, getSourceUrlString, getWrapperClass, hashCode, isModifiable, listAttributes, readArrayPropertyValueFromXMLElement, readMapPropertyFromXml, readPropertyValueFromXMLElement, readUnknownPropertyValueFromXMLElement, resolveSettings, setAttributeValue, setInfoset, setSourceUrl, setSourceUrlIfNull, toString, toXML, toXML, toXML, valueIsNullOrEmptyArray, writeArrayPropertyAsElement, writeMapPropertyToXml, writePropertyAsElement
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.apache.uima.resource.metadata.MetaDataObject
clone, equals, getAttributeValue, getSourceUrl, getSourceUrlString, isModifiable, listAttributes, setAttributeValue, setSourceUrl
Methods inherited from interface org.apache.uima.util.XMLizable
buildFromXMLElement, toXML, toXML, toXML
-
Constructor Details
-
CpeCasProcessorsImpl
public CpeCasProcessorsImpl()Instantiates a new cpe cas processors impl.
-
-
Method Details
-
setOutputQueueSize
Description copied from interface:CpeCasProcessors
Sets the size of the OutputQueue. This queue is shared among Processing Units and CasConsumers and contains bundles of CAS. Processing Units add bundles to the queue while CasConsumers consume them. The best size for this queue is determined by overall performance of the ProcessingUnit ( how fast it deposits bundles onto the queue) and memory availability. The larger the queue the more bundles (hence memory) is used.- Specified by:
setOutputQueueSize
in interfaceCpeCasProcessors
- Parameters:
aOutputQueueSize
- - Output queue size- Throws:
CpeDescriptorException
- tbd
-
getOutputQueueSize
public int getOutputQueueSize()Description copied from interface:CpeCasProcessors
Returns the size of the OutputQueue. This queue is shared among Processing Units and CasConsumers and contains bundles of CAS. Processing Units add bundles to the queue while CasConsumers consume them. The best size for this queue is determined by overall performance of the ProcessingUnit ( how fast it deposits bundles onto the queue) and memory availability. The larger the queue the more bundles (hence memory) is used.- Specified by:
getOutputQueueSize
in interfaceCpeCasProcessors
- Returns:
- - output queue size
-
setInputQueueSize
Description copied from interface:CpeCasProcessors
Sets the size of the InputQueue. This queue is shared among CollectionReader and Processing Units and contains bundles of CAS. CollectionReader adds bundles to the queue while Processing Unit consume them. The best size for this queue is determined by overall performance of the ProcessingUnit ( how fast it takes bundles off the queue) and memory availability. The larger the queue the more bundles (hence memory) is used.- Specified by:
setInputQueueSize
in interfaceCpeCasProcessors
- Parameters:
aInputQueueSize
- - queue size- Throws:
CpeDescriptorException
- tbd
-
getInputQueueSize
public int getInputQueueSize()Description copied from interface:CpeCasProcessors
Returns size of the InputQueue. This queue is shared among CollectionReader and Processing Units and contains bundles of CAS. CollectionReader adds bundles to the queue while Processing Unit consume them. The best size for this queue is determined by overall performance of the ProcessingUnit ( how fast it takes bundles off the queue) and memory availability. The larger the queue the more bundles (hence memory) is used.- Specified by:
getInputQueueSize
in interfaceCpeCasProcessors
- Returns:
- - queue size
-
setConcurrentPUCount
Description copied from interface:CpeCasProcessors
Sets ProcessingUnit replication. Each ProcessingUnit contains the same sequence of CasProcessors and runs in a seperate thread. On platforms containing more than one CPU, replicating ProcessingUnit may result in better performance.- Specified by:
setConcurrentPUCount
in interfaceCpeCasProcessors
- Parameters:
aConcurrentPUCount
- - number of ProcessingUnits(processing threads)- Throws:
CpeDescriptorException
- tbd
-
getConcurrentPUCount
public int getConcurrentPUCount()Description copied from interface:CpeCasProcessors
Returns number of ProcessingUnits. Each ProcessingUnit contains the same sequence of CasProcessors and runs in a seperate thread. On platforms containing more than one CPU, replicating ProcessingUnit may result in better performance.- Specified by:
getConcurrentPUCount
in interfaceCpeCasProcessors
- Returns:
- - number of ProcessingUnits(processing threads)
-
addCpeCasProcessor
public void addCpeCasProcessor(CpeCasProcessor aCasProcessor, int aInsertPosition) throws CpeDescriptorException Description copied from interface:CpeCasProcessors
Inserts a new CasProcessor at an indicated position.- Specified by:
addCpeCasProcessor
in interfaceCpeCasProcessors
- Parameters:
aCasProcessor
- - CasProcessor to addaInsertPosition
- - position where to insert the CasProcessor- Throws:
CpeDescriptorException
- tbd
-
addCpeCasProcessor
Description copied from interface:CpeCasProcessors
Appends new CasProcessor to existing list of CasProcessors- Specified by:
addCpeCasProcessor
in interfaceCpeCasProcessors
- Parameters:
aCasProcessor
- - CasProcessor to add- Throws:
CpeDescriptorException
- tbd
-
getCpeCasProcessor
Description copied from interface:CpeCasProcessors
ReturnsCpeCasProcessor
found at given position.- Specified by:
getCpeCasProcessor
in interfaceCpeCasProcessors
- Parameters:
aPosition
- - position of the CasProcessor- Returns:
- -
CpeCasProcessor
- Throws:
CpeDescriptorException
- tbd
-
getAllCpeCasProcessors
Description copied from interface:CpeCasProcessors
Returns ALLCpeCasProcessor
objects in processing pipeline.- Specified by:
getAllCpeCasProcessors
in interfaceCpeCasProcessors
- Returns:
- array of
CpeCasProcessor
- Throws:
CpeDescriptorException
- tbd
-
setAllCpeCasProcessors
Sets the all cpe cas processors.- Parameters:
aCpeProcessors
- the new all cpe cas processors- Throws:
CpeDescriptorException
- the cpe descriptor exception
-
removeCpeCasProcessor
Description copied from interface:CpeCasProcessors
RemovesCpeCasProcessor
object from processing pipeline from a given position.- Specified by:
removeCpeCasProcessor
in interfaceCpeCasProcessors
- Parameters:
aPosition
- - position of the CasProcessor in the pipeline- Throws:
CpeDescriptorException
- tbd
-
removeCpeCasProcessor
public CpeCasProcessor[] removeCpeCasProcessor(int aPosition, boolean flag) throws CpeDescriptorException New API 01/06/2006.- Parameters:
aPosition
- the a positionflag
- the flag- Returns:
- the cpe cas processor[]
- Throws:
CpeDescriptorException
- the cpe descriptor exception
-
removeAllCpeCasProcessors
Description copied from interface:CpeCasProcessors
Removes ALLCpeCasProcessor
objects from processing pipeline.- Specified by:
removeAllCpeCasProcessors
in interfaceCpeCasProcessors
- Throws:
CpeDescriptorException
- tbd
-
setPoolSize
- Specified by:
setPoolSize
in interfaceCpeCasProcessors
- Throws:
CpeDescriptorException
-
getPoolSize
Gets the pool size.- Returns:
- the pool size
- Throws:
CpeDescriptorException
- the cpe descriptor exception
-
setDropCasOnException
Sets the drop cas on exception.- Parameters:
aDropCasOnException
- the new drop cas on exception- Throws:
CpeDescriptorException
- the cpe descriptor exception
-
getDropCasOnException
public boolean getDropCasOnException()- Specified by:
getDropCasOnException
in interfaceCpeCasProcessors
-
buildFromXMLElement
public void buildFromXMLElement(Element aElement, XMLParser aParser, XMLParser.ParsingOptions aOptions) throws InvalidXMLException Overridden to read Cas Processor attributes.- Specified by:
buildFromXMLElement
in interfaceXMLizable
- Overrides:
buildFromXMLElement
in classMetaDataObject_impl
- Parameters:
aElement
- the a elementaParser
- the a parseraOptions
- the a options- Throws:
InvalidXMLException
- the invalid XML exception- See Also:
-
toXML
public void toXML(ContentHandler aContentHandler, boolean aWriteDefaultNamespaceAttribute) throws SAXException Description copied from interface:XMLizable
Writes this object's XML representation by making calls on a SAXContentHandler
.- Specified by:
toXML
in interfaceXMLizable
- Overrides:
toXML
in classMetaDataObject_impl
- Parameters:
aContentHandler
- the content handler to which this object will write events that describe its XML representation.aWriteDefaultNamespaceAttribute
- whether the namespace of this element should be written as the default namespace. This should be done only for the root element, and it defaults to false.- Throws:
SAXException
- pass thru- See Also:
-
getXMLAttributes
Overridden to handle Cas Processor attributes.- Overrides:
getXMLAttributes
in classMetaDataObject_impl
- Returns:
- the XML attributes
- See Also:
-
getXmlizationInfo
Description copied from class:MetaDataObject_impl
To be implemented by subclasses to return information describing how to represent this object in XML.- Specified by:
getXmlizationInfo
in classMetaDataObject_impl
- Returns:
- information defining this object's XML representation
-
getCasPoolSize
public int getCasPoolSize()- Specified by:
getCasPoolSize
in interfaceCpeCasProcessors
-
isDropCasOnException
public boolean isDropCasOnException()Checks if is drop cas on exception.- Returns:
- true, if is drop cas on exception
-