use of org.infinispan.server.hotrod.counter.listener.ClientCounterManagerNotificationManager in project infinispan by infinispan.
the class CheckAddressTask method startInternal.
@Override
protected void startInternal() {
GlobalComponentRegistry gcr = SecurityActions.getGlobalComponentRegistry(cacheManager);
this.iterationManager = new DefaultIterationManager(gcr.getTimeService());
this.hasDefaultCache = configuration.defaultCacheName() != null || cacheManager.getCacheManagerConfiguration().defaultCacheName().isPresent();
// Initialize query-specific stuff
queryFacade = loadQueryFacade();
clientListenerRegistry = new ClientListenerRegistry(gcr.getComponent(EncoderRegistry.class), gcr.getComponent(ExecutorService.class, NON_BLOCKING_EXECUTOR));
clientCounterNotificationManager = new ClientCounterManagerNotificationManager(asCounterManager(cacheManager));
addKeyValueFilterConverterFactory(ToEmptyBytesKeyValueFilterConverter.class.getName(), new ToEmptyBytesFactory());
addCacheEventConverterFactory("key-value-with-previous-converter-factory", new KeyValueWithPreviousEventConverterFactory());
addCacheEventConverterFactory("___eager-key-value-version-converter", KeyValueVersionConverterFactory.SINGLETON);
loadFilterConverterFactories(ParamKeyValueFilterConverterFactory.class, this::addKeyValueFilterConverterFactory);
loadFilterConverterFactories(CacheEventFilterConverterFactory.class, this::addCacheEventFilterConverterFactory);
loadFilterConverterFactories(CacheEventConverterFactory.class, this::addCacheEventConverterFactory);
loadFilterConverterFactories(KeyValueFilterConverterFactory.class, this::addKeyValueFilterConverterFactory);
DefaultThreadFactory factory = new DefaultThreadFactory(getQualifiedName() + "-Scheduled");
scheduledExecutor = Executors.newSingleThreadScheduledExecutor(factory);
removeCacheListener = new RemoveCacheListener();
SecurityActions.addListener(cacheManager, removeCacheListener);
// Start default cache and the endpoint before adding self to
// topology in order to avoid topology updates being used before
// endpoint is available.
super.startInternal();
// Add self to topology cache last, after everything is initialized
if (Configurations.isClustered(SecurityActions.getCacheManagerConfiguration(cacheManager))) {
defineTopologyCacheConfig(cacheManager);
if (log.isDebugEnabled())
log.debugf("Externally facing address is %s:%d", configuration.proxyHost(), configuration.proxyPort());
addSelfToTopologyView(cacheManager);
}
}
Aggregations