package com.ccc.dashboard.lunxun;
import com.ccc.dashboard.DAO.MoldProcessTotal;
import com.ccc.dashboard.entity.MoldProcessCalculate;
import com.danga.MemCached.*;
import java.text.SimpleDateFormat;
import java.util.*;
public class CatchServer {
SockIOPool pool=SockIOPool.getInstance();
public void init()
{
String server_list[]=new String[1];
server_list[0]="10.142.247.110:11211";
pool.setServers(server_list);
pool.setInitConn(5);
pool.setMinConn(5);
pool.setMaxConn(50);
pool.setMaintSleep(50);
pool.setNagle(false);
pool.initialize();
}
public void setMemCachServerValue(String execute_time)
{}
public String getCurrentDate()
{
String current_date="";
Date date=new Date(System.currentTimeMillis());
SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
current_date=sdf.format(date);
return current_date;
}
public void closeMemCachServer()
{
pool.shutDown();
}
public static void main(String[] args) {
Date date=new Date(System.currentTimeMillis());
SimpleDateFormat sdf=new SimpleDateFormat("MM/dd/yyyy HH:mm:ss");
String c_time=sdf.format(date);
System.out.println(c_time);
CatchServer cs=new CatchServer();
//cs.init();
cs.setMemCachServerValue(c_time);
//cs.closeMemCachServer();
}
}