public void initKnowledgeBaseCache() { if (knowledgeBaseCache == null) { if (knowledgeBaseCacheLimit <= 0) { knowledgeBaseCache = new DefaultDeploymentCache<Object>(); } else { knowledgeBaseCache = new DefaultDeploymentCache<Object>(knowledgeBaseCacheLimit); } } }
public void initProcessDefinitionCache() { if (processDefinitionCache == null) { if (processDefinitionCacheLimit <= 0) { processDefinitionCache = new DefaultDeploymentCache<ProcessDefinitionCacheEntry>(); } else { processDefinitionCache = new DefaultDeploymentCache<ProcessDefinitionCacheEntry>(processDefinitionCacheLimit); } } }
public void initProcessDefinitionCache() { if (processDefinitionCache == null) { if (processDefinitionCacheLimit <= 0) { processDefinitionCache = new DefaultDeploymentCache<ProcessDefinitionCacheEntry>(); } else { processDefinitionCache = new DefaultDeploymentCache<ProcessDefinitionCacheEntry>(processDefinitionCacheLimit); } } }
public void initKnowledgeBaseCache() { if (knowledgeBaseCache == null) { if (knowledgeBaseCacheLimit <= 0) { knowledgeBaseCache = new DefaultDeploymentCache<Object>(); } else { knowledgeBaseCache = new DefaultDeploymentCache<Object>(knowledgeBaseCacheLimit); } } }
processDefinitionCache = new DefaultDeploymentCache<ProcessDefinitionEntity>(); } else { processDefinitionCache = new DefaultDeploymentCache<ProcessDefinitionEntity>(processDefinitionCacheLimit); knowledgeBaseCache = new DefaultDeploymentCache<Object>(); } else { knowledgeBaseCache = new DefaultDeploymentCache<Object>(knowledgeBaseCacheLimit);
public Object getInstance(String deploymentId, String resource) { // First find in cache DeploymentCache<Object> deploymentCache = cacheInstance.get(deploymentId); if (deploymentCache == null) { deploymentCache = new DefaultDeploymentCache<Object>(); cacheInstance.put(deploymentId, deploymentCache); } Object instance = deploymentCache.get(resource); if (instance == null) { @SuppressWarnings("rawtypes") ProjectEngineFactory projectEngineFactory = get(deploymentId, resource); try { instance = projectEngineFactory.newInstance(); } catch (Exception e) { throw new ResourceCompileException( "Resource with name '" + resource + "' in deployment with id '" + deploymentId + "' compilation has been failed"); } deploymentCache.add(resource, instance); } return instance; }
public Object getInstance(String deploymentId, String resource) { // First find in cache DeploymentCache<Object> deploymentCache = cacheInstance.get(deploymentId); if (deploymentCache == null) { deploymentCache = new DefaultDeploymentCache<Object>(); cacheInstance.put(deploymentId, deploymentCache); } Object instance = deploymentCache.get(resource); if (instance == null) { @SuppressWarnings("rawtypes") ProjectEngineFactory projectEngineFactory = get(deploymentId, resource); try { instance = projectEngineFactory.newInstance(); } catch (Exception e) { throw new ResourceCompileException( "Resource with name '" + resource + "' in deployment with id '" + deploymentId + "' compilation has been failed"); } deploymentCache.add(resource, instance); } return instance; }
deploymentCache = new DefaultDeploymentCache<ProjectEngineFactory>(); cache.put(deploymentId, deploymentCache);
deploymentCache = new DefaultDeploymentCache<ProjectEngineFactory>(); cache.put(deploymentId, deploymentCache);