Package com.danga.MemCached

Examples of com.danga.MemCached.SockIOPool.initialize()


            //logger.info("size of the array is " + serverList.length);
            //String[] serverList = servers.split(",?[ *]");
            SockIOPool pool = SockIOPool.getInstance("livePool");
            pool.setServers(serverList);
            pool.initialize();

            cache = new MemCachedClient();
            //cache.setPoolName("livePool");
        }              
    }
View Full Code Here


     */
    public MemCacheUtility(String[] servers) {
        if (cache == null) {
            SockIOPool pool = SockIOPool.getInstance("livePool");
            pool.setServers(servers);
            pool.initialize();
            logger.info("In MemcacheUtility constructor");
            cache = new MemCachedClient();
            //cache.setPoolName("livePool");
        }
    }
View Full Code Here

            // and don't set a connect timeout
            pool.setNagle( false );
            pool.setSocketTO( 3000 );
            pool.setSocketConnectTO( 0 );

            pool.initialize();

            cache = new MemCachedClient();
            MemCachedClient.getLogger().setLevel(Logger.LEVEL_WARN);
           
            // Set thelog level to WARNING -- The defautl is INFO which causes unecessary logging
View Full Code Here

            //logger.info("size of the array is " + serverList.length);
            //String[] serverList = servers.split(",?[ *]");
            SockIOPool pool = SockIOPool.getInstance("livePool");
            pool.setServers(serverList);
            pool.initialize();

            cache = new MemCachedClient();
            //cache.setPoolName("livePool");
        }              
    }
View Full Code Here

     */
    public MemCacheUtility(String[] servers) {
        if (cache == null) {
            SockIOPool pool = SockIOPool.getInstance("livePool");
            pool.setServers(servers);
            pool.initialize();

            cache = new MemCachedClient();
            //cache.setPoolName("livePool");
        }
    }
View Full Code Here

    SockIOPool pool = SockIOPool.getInstance();
    pool.setMinConn(10);
    pool.setMaxConn(maxConn);
    pool.setMaxIdle(60 * 60 * 1000);
    pool.setServers(servers.split(" "));
    pool.initialize();

    MemCachedClient memcachedClient = new MemCachedClient();
    memcachedClient.setCompressThreshold(16 * 1024);
    System.out.println("Java-MemCached startup");
    warmUp(memcachedClient);
View Full Code Here

    pool.setNagle(false);
    pool.setSocketTO(3000);
    pool.setSocketConnectTO(0);

    // initialize the connection pool
    pool.initialize();

    // lets set some compression on for the client
    // compress anything larger than 64k
    client.setCompressEnable(true);
    client.setCompressThreshold(64 * 1024);
 
View Full Code Here

            //logger.info("size of the array is " + serverList.length);
            //String[] serverList = servers.split(",?[ *]");
            SockIOPool pool = SockIOPool.getInstance("livePool");
            pool.setServers(serverList);
            pool.initialize();

            cache = new MemCachedClient();
            //cache.setPoolName("livePool");
        }              
    }
View Full Code Here

     */
    public MemCacheUtility(String[] servers) {
        if (cache == null) {
            SockIOPool pool = SockIOPool.getInstance("livePool");
            pool.setServers(servers);
            pool.initialize();

            cache = new MemCachedClient();
            //cache.setPoolName("livePool");
        }
    }
View Full Code Here

    pool.setNagle(false);
    pool.setSocketTO(3000);
    pool.setSocketConnectTO(getConnectTimeout());

    // initialize the connection pool
    pool.initialize();

    // lets set some compression on for the client
    // compress anything larger than 64k
    // mcc.setCompressEnable(true);
    // mcc.setCompressThreshold(64 * 1024);
 
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.