package cn.map.szmap.cache.impl;

import cn.map.szmap.cache.AbstractCache;
import org.apache.log4j.Logger;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class JKLKCacheImpl extends AbstractCache {
	private static final Logger iLog = Logger.getLogger(JKLKCacheImpl.class);

	public final Long type;

	public JKLKCacheImpl(Long type) {
		this.type = type;
	}
	
	public void refreshAll(List<HashMap> list) {
		try {
			iLog.info("JKLKCacheImpl-------refreshAll"+list.size());
			System.out.println("JKLKCacheImpl-------refreshAll"+list.size());
			for (int i = 0; i < list.size(); i++) {
				Map m = list.get(i);
				m.put("id", m.get("lkbh"));
				String id = m.get("id").toString();
				m_cache.put(id, m);
				System.out.println("JKLKCacheImpl-------m_cache"+id);
				iLog.info("JKLKCacheImpl-------m_cache"+id);
			}
		} catch (Exception e) {
			e.printStackTrace();
			iLog.error("JKLKCacheImpl  refreshAll error ,layer type:"+type ,e);
			refreshTime.set(System.currentTimeMillis());
		
		}
	}

	@Override
	public List<Map> getData(Map condition) {
		// TODO Auto-generated method stub
		return null;
	}

}
