package org.springblade.flow.engine.custom.cache;//package jnpf.engine.custom.cache;
//
//import jnpf.engine.util.FileUtil;
//import jnpf.engine.util.ObjectUtils;
//import jnpf.engine.util.SpringContextHolder;
//import jnpf.util.RedisUtil;
//import org.activiti.bpmn.model.BpmnModel;
//import org.activiti.engine.impl.persistence.deploy.DeploymentCache;
//import org.activiti.engine.impl.persistence.entity.ProcessDefinitionEntity;
//import org.springframework.stereotype.Component;
//
//import javax.annotation.Resource;
//import java.util.HashMap;
//import java.util.Map;
//
//@Component
//public class CustomBpmnModelCache implements DeploymentCache<BpmnModel> {
////	private String redisKeyPrefix="bpmnModel:a6:";
////	@Resource
////	RedisUtil redisUtil;
////
////	public BpmnModel get(String id) {
////		byte[] bytes = redisUtil.nativeGetBytes(redisKeyPrefix+id);
////		if(bytes==null) return null;
////
////		BpmnModel bpmnModel=(BpmnModel) ObjectUtils.toObject(bytes);
////		if (bpmnModel == null) {
////			return null;
////		}
////
////		return bpmnModel;
////	}
////
////	@Override
////	public boolean contains(String id) {
////		return redisUtil.exists(redisKeyPrefix + id);
////	}
////
////	public void add(String id, BpmnModel object) {
////		redisUtil.nativeInsert(redisKeyPrefix+id,object);
////	}
////
////	public void remove(String id) {
////		redisUtil.remove(id);
////	}
////
////	/**
////	 * 不实现
////	 */
////	public void clear() {
////
////	}
//}
