zoukankan      html  css  js  c++  java
  • Memcached 集群环境Java客户端

    Memcached 集群环境Java客户端

    学习了:

    http://blog.csdn.net/zhouzhiwengang/article/details/53154112

    http://guazi.iteye.com/blog/1071646

    还有:

    http://blog.csdn.net/xuke6677/article/details/38706501

    程序文件下载:https://files.cnblogs.com/files/stono/cache.rar

    简版集群调用:

    package com.stono.memcached;
    
    import com.danga.MemCached.MemCachedClient;
    import com.danga.MemCached.SockIOPool;
    
    public class TestCluster {
        public static void main(String[] args) {
            MemCachedClient client = new MemCachedClient();
            
            SockIOPool pool = SockIOPool.getInstance();
            String [] servers = {"127.0.0.1:11211","127.0.0.1:22122"};
            pool.setServers(servers);
            pool.initialize();
            client.add("ab", "ab12345");
        }
    }

    然后可以使用客户端进行查看,只在一台服务器上面有值。

  • 相关阅读:
    从up6-down2升级到down3
    XproerIM产品使用手册
    Web大文件上传控件-asp.net-bug修复-Xproer.HttpUploader6.2
    WordPaster-Chrome浏览器控件安装方法
    poj1009
    poj1012
    poj1016
    poj1019
    poj1023
    poj1026
  • 原文地址:https://www.cnblogs.com/stono/p/8092804.html
Copyright © 2011-2022 走看看