org.apache.uima.resource.ResourceManager.getCasManager()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(3.5k)|赞(0)|评价(0)|浏览(96)

本文整理了Java中org.apache.uima.resource.ResourceManager.getCasManager方法的一些代码示例,展示了ResourceManager.getCasManager的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ResourceManager.getCasManager方法的具体详情如下:
包路径:org.apache.uima.resource.ResourceManager
类名称:ResourceManager
方法名:getCasManager

ResourceManager.getCasManager介绍

[英]Gets the CasManager, which manages the creation and pooling of CASes.
[中]获取CasManager,它管理案例的创建和池。

代码示例

代码示例来源:origin: apache/uima-uimaj

/**
 * Gets the CasManager associated with this CAS Definition.
 * 
 * @return this CAS Definition's CasManager
 */
public CasManager getCasManager() {
 if (this.resourceManager != null) {
  return this.resourceManager.getCasManager();
 } else {
  return null;
 }
}

代码示例来源:origin: apache/uima-uimaj

/**
 * Get the CasManager for this Resource. The CasManager manages the creation and pooling of CASes.
 * 
 * @return the CasManager
 */
public CasManager getCasManager() {
 return getResourceManager().getCasManager();
}

代码示例来源:origin: apache/uima-uimaj

private CasManager getCasManager() {
 return mFlowControllerContainer.getResourceManager().getCasManager();
}

代码示例来源:origin: HeidelTime/heideltime

/**
 * Constructor
 * 
 * @param typeSystemDescriptions
 */
public JCasFactoryImpl(TypeSystemDescription[] typeSystemDescriptions) {
  // Initialize cas manager
  ResourceManager resManager = new ResourceManager_impl();
  casManager = resManager.getCasManager();
  
  for (TypeSystemDescription desc : typeSystemDescriptions) {
    ProcessingResourceMetaData metaData = new ProcessingResourceMetaData_impl();
    metaData.setTypeSystem(desc);
    
    casManager.addMetaData(metaData);
  }
}

代码示例来源:origin: apache/uima-uimaj

rsrcMgr.setCasManager(parentResourceManager.getCasManager());  // shares the same merged type system

代码示例来源:origin: org.apache.uima/uimaj-cpe

/**
 * Initialize the CPE.
 *
 * @throws Exception -
 */
private void bootstrapCPE() throws Exception {
 registerTypeSystemsWithCasManager();
 casPool = new CPECasPool(getPoolSize(), cpeFactory.getResourceManager().getCasManager(), mPerformanceTuningSettings);
 callTypeSystemInit();
 setupProcessingPipeline();
 setupConsumerPipeline();
}

代码示例来源:origin: apache/uima-uimaj

getResourceManager().getCasManager().defineCasPool(this, mCasPoolSize,
       mPerformanceTuningSettings);
  } catch (ResourceInitializationException e) {
       Integer.toString(mCasPoolSize) });
CasManager casManager = getResourceManager().getCasManager();

代码示例来源:origin: org.apache.uima/uimaj-cpe

CasManager manager= this.cpeFactory.getResourceManager().getCasManager();

代码示例来源:origin: org.apache.uima/uimaj-cpe

new Object[] { Thread.currentThread().getName(), String.valueOf(poolSize) });
casPool = new CPECasPool(poolSize, cpeFactory.getResourceManager().getCasManager(), 
    mPerformanceTuningSettings);
callTypeSystemInit();

代码示例来源:origin: org.apache.uima/uimaj-as-core

private void initializeComponentCasPool(int aComponentCasPoolSize, long anInitialCasHeapSize, boolean disableJCasCache) {
 if (aComponentCasPoolSize > 0) {
  EECasManager_impl cm = (EECasManager_impl) getResourceManager().getCasManager();
  
  cm.setInitialCasHeapSize(anInitialCasHeapSize);
  cm.setPoolSize(getUimaContextAdmin().getUniqueName(), aComponentCasPoolSize);
  if ( disableJCasCache ) {
   cm.disableJCasCaching();
  }
  if (UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.INFO)) {
   UIMAFramework.getLogger(CLASS_NAME).logrb(
       Level.INFO,
       CLASS_NAME.getName(),
       "initializeComponentCasPool",
       UIMAEE_Constants.JMS_LOG_RESOURCE_BUNDLE,
       "UIMAEE_cas_pool_config_INFO",
       new Object[] { getComponentName(), getUimaContextAdmin().getQualifiedContextName(),
         aComponentCasPoolSize, anInitialCasHeapSize / 4, disableJCasCache });
  }
 } 
}

代码示例来源:origin: org.apache.uima/uimaj-as-core

EECasManager_impl cm = (EECasManager_impl) getResourceManager().getCasManager();
if (cm != null) {
 cm.cleanUp();

相关文章