in src/main/java/org/apache/sling/nosql/couchbase/client/impl/CouchbaseClientImpl.java [80:103]
private void activate(Map<String, Object> config) {
clientId = PropertiesUtil.toString(config.get(CLIENT_ID_PROPERTY), null);
enabled = PropertiesUtil.toBoolean(config.get(ENABLED_PROPERTY), ENABLED_PROPERTY_DEFAULT);
couchbaseHosts = PropertiesUtil.toStringArray(config.get(COUCHBASE_HOSTS_PROPERTY));
bucketName = PropertiesUtil.toString(config.get(CACHE_BUCKET_NAME_PROPERTY), null);
bucketPassword = PropertiesUtil.toString(config.get(CACHE_BUCKET_PASSWORD_PROPERTY), null);
if (!enabled) {
log.info("Couchbase caching for client '{}' is disabled by configuration.", clientId);
return;
}
if (couchbaseHosts == null || couchbaseHosts.length == 0) {
enabled = false;
log.warn("No couchbase host configured, client '{}' is disabled.", clientId);
return;
}
if (bucketName == null) {
enabled = false;
log.warn("No couchbase bucket name configured, client '{}' is disabled.", clientId);
return;
}
}