Search in sources :

Example 1 with CouchbaseServiceRegistryProperties

use of org.apereo.cas.configuration.model.support.couchbase.serviceregistry.CouchbaseServiceRegistryProperties in project cas by apereo.

the class CouchbaseServiceRegistryConfiguration method serviceRegistryCouchbaseClientFactory.

/**
 * Service registry couchbase client factory couchbase client factory.
 *
 * @return the couchbase client factory
 */
@RefreshScope
@Bean
public CouchbaseClientFactory serviceRegistryCouchbaseClientFactory() {
    final CouchbaseServiceRegistryProperties couchbase = casProperties.getServiceRegistry().getCouchbase();
    final Set<String> nodes = StringUtils.commaDelimitedListToSet(couchbase.getNodeSet());
    return new CouchbaseClientFactory(nodes, couchbase.getBucket(), couchbase.getPassword(), Beans.newDuration(couchbase.getTimeout()).toMillis(), CouchbaseServiceRegistry.UTIL_DOCUMENT, CouchbaseServiceRegistry.ALL_VIEWS);
}
Also used : CouchbaseServiceRegistryProperties(org.apereo.cas.configuration.model.support.couchbase.serviceregistry.CouchbaseServiceRegistryProperties) CouchbaseClientFactory(org.apereo.cas.couchbase.core.CouchbaseClientFactory) RefreshScope(org.springframework.cloud.context.config.annotation.RefreshScope) Bean(org.springframework.context.annotation.Bean)

Aggregations

CouchbaseServiceRegistryProperties (org.apereo.cas.configuration.model.support.couchbase.serviceregistry.CouchbaseServiceRegistryProperties)1 CouchbaseClientFactory (org.apereo.cas.couchbase.core.CouchbaseClientFactory)1 RefreshScope (org.springframework.cloud.context.config.annotation.RefreshScope)1 Bean (org.springframework.context.annotation.Bean)1