private void cache(Process entity) {
		Cache<String, String> nameCache = ensureAvailableNameCache();
		Cache<String, Process> entityCache = ensureAvailableEntityCache();
		if(entity.getModel() == null && entity.getDBContent() != null) {
			entity.setModel(ModelParser.parse(entity.getDBContent()));
		}
		String processName = entity.getName() + DEFAULT_SEPARATOR + entity.getVersion();
		if(nameCache != null && entityCache != null) {
			if(log.isDebugEnabled()) {
				log.debug("cache process id is[{}],name is[{}]", entity.getId(), processName);
			}
			entityCache.put(processName, entity);
			nameCache.put(entity.getId(), processName);
		} else {
			if(log.isDebugEnabled()) {
				log.debug("no cache implementation class");
			}
		}
	}
private void cache(Process entity) {
		Cache<String, String> nameCache = ensureAvailableNameCache();
		Cache<String, Process> entityCache = ensureAvailableEntityCache();
		if(entity.getModel() == null && entity.getDBContent() != null) {
			entity.setModel(ModelParser.parse(entity.getDBContent()));
		}
		String processName = entity.getName() + DEFAULT_SEPARATOR + entity.getVersion();
		if(nameCache != null && entityCache != null) {
			if(log.isDebugEnabled()) {
				log.debug("cache process id is[{}],name is[{}]", entity.getId(), processName);
			}
			entityCache.put(processName, entity);
			nameCache.put(entity.getId(), processName);
		} else {
			if(log.isDebugEnabled()) {
				log.debug("no cache implementation class");
			}
		}
	}
private void cache ( Process entity ) { Cache < String , String > nameCache = ensureAvailableNameCache ( ) ; Cache < String , Process > entityCache = ensureAvailableEntityCache ( ) ; if ( entity . getModel ( ) == null && entity . getDBContent ( ) != null ) { entity . setModel ( ModelParser . parse ( entity . getDBContent ( ) ) ) ; } String processName = entity . getName ( ) + DEFAULT_SEPARATOR + entity . getVersion ( ) ; if ( nameCache != null && entityCache != null ) { if ( log . isDebugEnabled ( ) ) { log . debug ( "cache process id is[{}],name is[{}]" , entity . getId ( ) , processName ) ; } entityCache . put ( processName , entity ) ; nameCache . put ( entity . getId ( ) , processName ) ; } else { if ( log . isDebugEnabled ( ) ) { log . debug ( "no cache implementation class" ) ; } } }
缓存实体
@param entity 流程定义对象
缓存实体