use of org.camunda.bpm.engine.impl.db.entitymanager.cache.DbEntityCache in project camunda-bpm-platform by camunda.
the class DbEntityManager method initializeEntityCache.
protected void initializeEntityCache() {
final JobExecutorContext jobExecutorContext = Context.getJobExecutorContext();
final ProcessEngineConfigurationImpl processEngineConfiguration = Context.getProcessEngineConfiguration();
if (processEngineConfiguration != null && processEngineConfiguration.isDbEntityCacheReuseEnabled() && jobExecutorContext != null) {
dbEntityCache = jobExecutorContext.getEntityCache();
if (dbEntityCache == null) {
dbEntityCache = new DbEntityCache(processEngineConfiguration.getDbEntityCacheKeyMapping());
jobExecutorContext.setEntityCache(dbEntityCache);
}
} else {
if (processEngineConfiguration != null) {
dbEntityCache = new DbEntityCache(processEngineConfiguration.getDbEntityCacheKeyMapping());
} else {
dbEntityCache = new DbEntityCache();
}
}
}
Aggregations