I am really new to memcache .I just tested memcached in java .The java class builds successfully but when i run the file it keeps on running never gets stopped..
The code i used is….
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");
}
}
}
When i run this code it give me the following and run doesn’t gets stopped..
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
You probably need to call the shutdown method for the memcached client: