天天看點

java中使用memcached_在java中使用memcached

我對memcache非常陌生。我隻是在java中測試了memcached。java類成功建構,但是當我運作該檔案時,它始終運作永遠不會停止..

我使用的代碼是...

public class NewMem {

public static void main(String[] args) throws IOException, URISyntaxException{

try {

MemcachedClient client = new MemcachedClient(new InetSocketAddress("localhost", 11211));

} catch (IOException e) {

e.printStackTrace();

System.err.println("connection problem");

}

}

}當我運作這段代碼時,它會給我下面的内容,并且不會停止運作..

init:

deps-jar:

compile-single:

run-single:

2011-11-21 12:15:58.328 INFO net.spy.memcached.MemcachedConnection: Added {QA sa=/localhost:11211, #Rops=0, #Wops=0, #iq=0, topRop=null, topWop=null, toWrite=0, interested=0} to connect queue

2011-11-21 12:15:58.328 INFO net.spy.memcached.MemcachedConnection: Connection state changed for [email protected]