use of org.apereo.cas.memcached.MemcachedPooledClientConnectionFactory in project cas by apereo.
the class MemcachedMonitorConfiguration method memcachedHealthIndicator.
@Bean
public HealthIndicator memcachedHealthIndicator() {
final MonitorProperties.Memcached memcached = casProperties.getMonitor().getMemcached();
final MemcachedPooledClientConnectionFactory factory = new MemcachedPooledClientConnectionFactory(memcached, memcachedMonitorTranscoder());
final ObjectPool<MemcachedClientIF> pool = new GenericObjectPool<>(factory);
return new MemcachedHealthIndicator(pool, casProperties);
}
use of org.apereo.cas.memcached.MemcachedPooledClientConnectionFactory in project cas by apereo.
the class MemcachedTicketRegistryConfiguration method ticketRegistry.
@Bean
public TicketRegistry ticketRegistry() {
final MemcachedTicketRegistryProperties memcached = casProperties.getTicket().getRegistry().getMemcached();
final MemcachedPooledClientConnectionFactory factory = new MemcachedPooledClientConnectionFactory(memcached, memcachedTicketRegistryTranscoder());
final MemcachedTicketRegistry registry = new MemcachedTicketRegistry(factory.getObjectPool());
final CipherExecutor cipherExecutor = CoreTicketUtils.newTicketRegistryCipherExecutor(memcached.getCrypto(), "memcached");
registry.setCipherExecutor(cipherExecutor);
return registry;
}
use of org.apereo.cas.memcached.MemcachedPooledClientConnectionFactory in project cas by apereo.
the class MemcachedMonitorConfiguration method memcachedHealthClientPool.
@Bean
@RefreshScope(proxyMode = ScopedProxyMode.DEFAULT)
@ConditionalOnMissingBean(name = "memcachedHealthClientPool")
public ObjectPool<MemcachedClientIF> memcachedHealthClientPool(@Qualifier("memcachedMonitorTranscoder") final Transcoder memcachedMonitorTranscoder, final CasConfigurationProperties casProperties) {
val memcached = casProperties.getMonitor().getMemcached();
val factory = new MemcachedPooledClientConnectionFactory(memcached, memcachedMonitorTranscoder);
return new GenericObjectPool<>(factory);
}
use of org.apereo.cas.memcached.MemcachedPooledClientConnectionFactory in project cas by apereo.
the class MemcachedTicketRegistryConfiguration method ticketRegistry.
@Bean
@RefreshScope(proxyMode = ScopedProxyMode.DEFAULT)
public TicketRegistry ticketRegistry(final CasConfigurationProperties casProperties, @Qualifier("memcachedTicketRegistryTranscoder") final Transcoder memcachedTicketRegistryTranscoder) {
val memcached = casProperties.getTicket().getRegistry().getMemcached();
val factory = new MemcachedPooledClientConnectionFactory(memcached, memcachedTicketRegistryTranscoder);
val registry = new MemcachedTicketRegistry(factory.getObjectPool());
val cipherExecutor = CoreTicketUtils.newTicketRegistryCipherExecutor(memcached.getCrypto(), "memcached");
registry.setCipherExecutor(cipherExecutor);
return registry;
}
Aggregations