java中使用memcached_在java中使用memcached

我对memcache非常陌生。我只是在java中测试了memcached。java类成功构建,但是当我运行该文件时,它始终运行永远不会停止.. 我使用的代码是

我对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 sun.nio.ch.SelectionKeyImpl@1c5c1