package com.zhiwei.manage.handle;

import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;
import javax.annotation.Resource;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.data.mongodb.core.MongoTemplate;
import org.springframework.stereotype.Service;

import com.zhiwei.manage.bean.ServerBean;

@Service("firstRun")
public class DbDepot {

	@Resource(name = "mongoTemplate")
	private MongoTemplate mongo;
	public static ConcurrentMap<String, Object> esClients;
	public static ConcurrentMap<String, ServerBean> serverBeans;
	public static int month = 0;
	private static final Log log = LogFactory.getLog(DbDepot.class);

	public void init() {
		log.info("数据连接map初始化");
		esClients = new ConcurrentHashMap<String, Object>();
		serverBeans = new ConcurrentHashMap<String, ServerBean>();
		System.out.println("连接初始化成功");
	}
}
