addresses += Yalp.configuration.get("memcached." + nb + ".host") + " ";
nb++;
}
addrs = AddrUtil.getAddresses(addresses);
} else {
throw new ConfigurationException("Bad configuration for memcached: missing host(s)");
}
if (Yalp.configuration.containsKey("memcached.user")) {
String memcacheUser = Yalp.configuration.getProperty("memcached.user");
String memcachePassword = Yalp.configuration.getProperty("memcached.password");
if (memcachePassword == null) {
throw new ConfigurationException("Bad configuration for memcached: missing password");
}
// Use plain SASL to connect to memcached
AuthDescriptor ad = new AuthDescriptor(new String[]{"PLAIN"},
new PlainCallbackHandler(memcacheUser, memcachePassword));