// And: http://code.google.com/p/spymemcached/wiki/Examples#Establishing_a_Membase_Connection
final CouchbaseConnectionFactoryBuilder factory = newCouchbaseConnectionFactoryBuilder();
factory.setOpTimeout(operationTimeout);
factory.setMaxReconnectDelay(maxReconnectDelay);
factory.setFailureMode(FailureMode.Redistribute);
return new CouchbaseClient(factory.buildCouchbaseConnection(memcachedNodesManager.getCouchbaseBucketURIs(), username, password));
} catch (final Exception e) {
throw new RuntimeException("Could not create memcached client", e);
}
}