Package net.spy.memcached.vbucket.config

Examples of net.spy.memcached.vbucket.config.Config


        throw new IllegalArgumentException("The base URI must be absolute");
      }
    }
    this.configurationProvider = new ConfigurationProviderHTTP(baseList, usr, pwd);
    Bucket bucket = this.configurationProvider.getBucketConfiguration(bucketName);
    Config config = bucket.getConfig();
    ConnectionFactoryBuilder cfb = new ConnectionFactoryBuilder();
    if (config.getConfigType() == ConfigType.MEMBASE) {
      cfb.setFailureMode(FailureMode.Retry)
        .setProtocol(ConnectionFactoryBuilder.Protocol.BINARY)
        .setHashAlg(HashAlgorithm.KETAMA_HASH)
        .setLocatorType(ConnectionFactoryBuilder.Locator.VBUCKET)
        .setVBucketConfig(bucket.getConfig());
    } else if (config.getConfigType() == ConfigType.MEMCACHE) {
      cfb.setFailureMode(FailureMode.Retry)
        .setProtocol(ConnectionFactoryBuilder.Protocol.BINARY)
        .setHashAlg(HashAlgorithm.KETAMA_HASH)
        .setLocatorType(ConnectionFactoryBuilder.Locator.CONSISTENT);
    } else {
View Full Code Here

TOP

Related Classes of net.spy.memcached.vbucket.config.Config

Copyright © 2018 www.massapicom. 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.