ZoroXing / xmemcached

Automatically exported from code.google.com/p/xmemcached
Apache License 2.0
0 stars 0 forks source link

Session has been closed #186

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1.Session has been closed

我用的是xmemcached-1.3.6.jar
log4j-1.2.15.jar
slf4j-log4j12-1.6.0.jar
slf4j-api-1.6.0.jar
这几个包啊 
代码
    MemcachedClientBuilder builder = new XMemcachedClientBuilder(AddrUtil
                .getAddresses("127.0.0.1:11211"));
        builder.setCommandFactory(new BinaryCommandFactory());
    //  builder.setConnectTimeout(5000);
        MemcachedClient memcachedClient = builder.build();
        try {
            memcachedClient.setOptimizeGet(true);
            memcachedClient.setOpTimeout(100000);
            memcachedClient.setConnectTimeout(100000);
            memcachedClient.set("hello", 0, "Hello,xmemcached");
            String value = memcachedClient.get("hello");
            System.out.println("hello=" + value);
            memcachedClient.delete("hello");
            value = memcachedClient.get("hello");
            System.out.println("hello=" + value);
        } catch (MemcachedException e) {
            System.err.println("MemcachedClient operation fail");
            e.printStackTrace();
        } catch (TimeoutException e) {
            System.err.println("MemcachedClient operation timeout");
            e.printStackTrace();
        } catch (InterruptedException e) {
            // ignore
        } catch (Exception e) {
            e.printStackTrace();
        }
        try {
            // close memcached client
            memcachedClient.shutdown();
        } catch (IOException e) {
            System.err.println("Shutdown MemcachedClient fail");
            e.printStackTrace();
        }

Original issue reported on code.google.com by huangjiy...@gmail.com on 19 Mar 2012 at 10:01

GoogleCodeExporter commented 8 years ago
请给出堆栈和错误信息

Original comment by killme2...@gmail.com on 19 Mar 2012 at 10:18

GoogleCodeExporter commented 8 years ago
没有反馈我关闭了,谢谢。如果有后续反馈,仍然有问题我��
�重新打开。

Original comment by killme2...@gmail.com on 26 Mar 2012 at 10:29