private static JedisPoolConfig jpc = null;
private static JedisPool pool = null;
static {
ResourceBundle bundle = ResourceBundle.getBundle("jedis");
String maxTotal = bundle.getString("jdbc.maxTotal");
String maxIdel = bundle.getString("jdbc.maxIdel");
String host = bundle.getString("jdbc.host");
String prot = bundle.getString("jdbc.prot");
jpc = new JedisPoolConfig();
jpc.setMaxTotal(Integer.parseInt(maxTotal));
jpc.setMaxIdle(Integer.parseInt(maxIdel));
pool = new JedisPool(jpc,host,Integer.parseInt(prot));
}
public static Jedis getJedis(){
return pool.getResource();
}