Search in sources :

Example 1 with ProcessDefinitionInfoCache

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);
    }
}
Also used : ProcessDefinitionInfoCache(org.activiti.engine.impl.persistence.deploy.ProcessDefinitionInfoCache) DeploymentManager(org.activiti.engine.impl.persistence.deploy.DeploymentManager) ProcessDefinitionEntity(org.activiti.engine.impl.persistence.entity.ProcessDefinitionEntity) BpmnDeployer(org.activiti.engine.impl.bpmn.deployer.BpmnDeployer) Deployer(org.activiti.engine.impl.persistence.deploy.Deployer) BpmnModel(org.activiti.bpmn.model.BpmnModel)

Aggregations

BpmnModel (org.activiti.bpmn.model.BpmnModel)1 BpmnDeployer (org.activiti.engine.impl.bpmn.deployer.BpmnDeployer)1 Deployer (org.activiti.engine.impl.persistence.deploy.Deployer)1 DeploymentManager (org.activiti.engine.impl.persistence.deploy.DeploymentManager)1 ProcessDefinitionInfoCache (org.activiti.engine.impl.persistence.deploy.ProcessDefinitionInfoCache)1 ProcessDefinitionEntity (org.activiti.engine.impl.persistence.entity.ProcessDefinitionEntity)1