package co.jufeng.util;
import java.io.IOException;
import net.rubyeye.xmemcached.MemcachedClient;
import net.rubyeye.xmemcached.MemcachedClientBuilder;
import net.rubyeye.xmemcached.XMemcachedClientBuilder;
import net.rubyeye.xmemcached.utils.AddrUtil;
public class MemcachedUtils {
public static MemcachedClient memcachedClient;
static{
MemcachedClientBuilder builder = new XMemcachedClientBuilder(AddrUtil.getAddresses("192.168.10.70:11211"));
try {
memcachedClient = builder.build();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
builder.setConnectionPoolSize(5);
}
}
import java.io.IOException;
import net.rubyeye.xmemcached.MemcachedClient;
import net.rubyeye.xmemcached.MemcachedClientBuilder;
import net.rubyeye.xmemcached.XMemcachedClientBuilder;
import net.rubyeye.xmemcached.utils.AddrUtil;
public class MemcachedUtils {
public static MemcachedClient memcachedClient;
static{
MemcachedClientBuilder builder = new XMemcachedClientBuilder(AddrUtil.getAddresses("192.168.10.70:11211"));
try {
memcachedClient = builder.build();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
builder.setConnectionPoolSize(5);
}
}