use of org.activiti.engine.impl.persistence.deploy.ProcessDefinitionInfoCache in project Activiti by Activiti.
the class ProcessEngineConfigurationImpl method initDeployers.
// deployers ////////////////////////////////////////////////////////////////
protected void initDeployers() {
if (this.deployers == null) {
this.deployers = new ArrayList<Deployer>();
if (customPreDeployers != null) {
this.deployers.addAll(customPreDeployers);
}
this.deployers.addAll(getDefaultDeployers());
if (customPostDeployers != null) {
this.deployers.addAll(customPostDeployers);
}
}
if (deploymentManager == null) {
deploymentManager = new DeploymentManager();
deploymentManager.setDeployers(deployers);
// Process Definition cache
if (processDefinitionCache == null) {
if (processDefinitionCacheLimit <= 0) {
processDefinitionCache = new DefaultDeploymentCache<ProcessDefinitionEntity>();
} else {
processDefinitionCache = new DefaultDeploymentCache<ProcessDefinitionEntity>(processDefinitionCacheLimit);
}
}
// BpmnModel cache
if (bpmnModelCache == null) {
if (bpmnModelCacheLimit <= 0) {
bpmnModelCache = new DefaultDeploymentCache<BpmnModel>();
} else {
bpmnModelCache = new DefaultDeploymentCache<BpmnModel>(bpmnModelCacheLimit);
}
}
if (processDefinitionInfoCache == null) {
if (processDefinitionInfoCacheLimit <= 0) {
processDefinitionInfoCache = new ProcessDefinitionInfoCache(commandExecutor);
} else {
processDefinitionInfoCache = new ProcessDefinitionInfoCache(commandExecutor, processDefinitionInfoCacheLimit);
}
}
// Knowledge base cache (used for Drools business task)
if (knowledgeBaseCache == null) {
if (knowledgeBaseCacheLimit <= 0) {
knowledgeBaseCache = new DefaultDeploymentCache<Object>();
} else {
knowledgeBaseCache = new DefaultDeploymentCache<Object>(knowledgeBaseCacheLimit);
}
}
deploymentManager.setProcessDefinitionCache(processDefinitionCache);
deploymentManager.setBpmnModelCache(bpmnModelCache);
deploymentManager.setProcessDefinitionInfoCache(processDefinitionInfoCache);
deploymentManager.setKnowledgeBaseCache(knowledgeBaseCache);
}
}
Aggregations