|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface CasManager
Manages creation and pooling of CAS instances within an AnalysisEngine.
Method Summary | |
---|---|
void |
addMetaData(ProcessingResourceMetaData aMetadata)
Called by components when they initialize. |
CAS |
createNewCas(Properties aPerformanceTuningSettings)
Create a new CAS using the CasDefinition stored in this CAS Manager. |
void |
defineCasPool(String aRequestorContextName,
int aMinimumSize,
Properties aPerformanceTuningSettings)
Defines a CAS pool within this CAS Manager. |
void |
defineCasPool(UimaContextAdmin aRequestorContext,
int aMinimumSize,
Properties aPerformanceTuningSettings)
Defines the CAS pool required by a particular AnalysisEngine. |
CAS |
getCas(String aRequestorContextName)
Gets an empty CAS. |
CasDefinition |
getCasDefinition()
Gets the CasDefinition, as defined by merging all of the metadata supplied by calls addMetaData(ProcessingResourceMetaData) . |
AbstractCas |
getCasInterface(CAS cas,
Class<? extends AbstractCas> requiredInterface)
Gets a specified interface to a CAS. |
void |
setJmxInfo(Object aMBeanServer,
String aRootComponentMBeanName)
Configures this CAS Manager so it can register an MBean for each of its CAS pools. |
Methods inherited from interface org.apache.uima.cas.CasOwner |
---|
releaseCas |
Method Detail |
---|
void addMetaData(ProcessingResourceMetaData aMetadata)
aMetadata
- an object containing metadata for the component, including Type System, Type
Priorities, and Index Definitions needed to create the CAS.CasDefinition getCasDefinition() throws ResourceInitializationException
addMetaData(ProcessingResourceMetaData)
.
ResourceInitializationException
- if metadata could not be mergedvoid defineCasPool(String aRequestorContextName, int aMinimumSize, Properties aPerformanceTuningSettings) throws ResourceInitializationException
defineCasPool(UimaContextAdmin, int, Properties)
should be used instead.
aRequestorContextName
- name to give to the pool. Must be unique among all pool names in this
CAS manager, and care should be taken to assure that this does not match the
qualified name of UIMA Contexts passed to defineCasPool(UimaContextAdmin, int, Properties)
.
This name is later passed to the getCas(String)
method, to check out
CASes from the pool.aSize
- the minimum CAS pool size requiredaPerformanceTuningSettings
- settings, including initial CAS heap size, for the AE
ResourceInitializationException
- if a CAS could not be created.void defineCasPool(UimaContextAdmin aRequestorContext, int aMinimumSize, Properties aPerformanceTuningSettings) throws ResourceInitializationException
aRequestorContextName
- the UimaContext of the AE that will request the CASes
(AnalysisEngine.getUimaContextAdmin()).aSize
- the minimum CAS pool size requiredaPerformanceTuningSettings
- settings, including initial CAS heap size, for the AE
ResourceInitializationException
- if a CAS could not be created.CAS getCas(String aRequestorContextName)
defineCasPool(String, int, Properties)
and established a CAS Pool of size > 0. The CAS
Manager maintains a separate pool for each AnalysisEngine. This method may block if the CAS
pool does not contain any free instances.
aRequestorContextName
- the context name of the AE requesting the CAS
(AnalysisEngine.getUimaContextAdmin().getQualifiedContextName()).
CAS createNewCas(Properties aPerformanceTuningSettings) throws ResourceInitializationException
aPerformanceTuningSettings
- settings, including initial CAS heap size, for the AE
ResourceInitializationException
- if the CAS could not be createdAbstractCas getCasInterface(CAS cas, Class<? extends AbstractCas> requiredInterface)
cas
- The CASrequiredInterface
- interface to get. Currently must be either CAS or JCas.void setJmxInfo(Object aMBeanServer, String aRootComponentMBeanName)
aMBeanServer
- the JMX MBean Server to register MBeans with. If null, the
platform MBeanServer (Java 1.5+ only) will be used.aRootComponentMBeanName
- unique MBean name for the root component that owns
this CAS Manager. The names of the CAS Pool MBeans will be formed by appending
,casPoolContextName=[contextName]
to the root component name, where
[contextName] is the requestorContextName for the CasPool.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |