cfb.setFailureMode(FailureMode.Retry)
.setProtocol(ConnectionFactoryBuilder.Protocol.BINARY)
.setHashAlg(HashAlgorithm.KETAMA_HASH)
.setLocatorType(ConnectionFactoryBuilder.Locator.CONSISTENT);
} else {
throw new ConfigurationException("Bucket type not supported or JSON response unexpected");
}
if (!this.configurationProvider.getAnonymousAuthBucket().equals(bucketName) && usr != null) {
AuthDescriptor ad = new AuthDescriptor(new String[]{"PLAIN"},
new PlainCallbackHandler(usr, pwd));
cfb.setAuthDescriptor(ad);