Search in sources :

Example 1 with KeyValueWithPreviousEventConverterFactory

use of org.infinispan.server.hotrod.event.KeyValueWithPreviousEventConverterFactory 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);
    }
}
Also used : DefaultThreadFactory(io.netty.util.concurrent.DefaultThreadFactory) DefaultIterationManager(org.infinispan.server.hotrod.iteration.DefaultIterationManager) ClientCounterManagerNotificationManager(org.infinispan.server.hotrod.counter.listener.ClientCounterManagerNotificationManager) GlobalComponentRegistry(org.infinispan.factories.GlobalComponentRegistry) KeyValueWithPreviousEventConverterFactory(org.infinispan.server.hotrod.event.KeyValueWithPreviousEventConverterFactory)

Aggregations

DefaultThreadFactory (io.netty.util.concurrent.DefaultThreadFactory)1 GlobalComponentRegistry (org.infinispan.factories.GlobalComponentRegistry)1 ClientCounterManagerNotificationManager (org.infinispan.server.hotrod.counter.listener.ClientCounterManagerNotificationManager)1 KeyValueWithPreviousEventConverterFactory (org.infinispan.server.hotrod.event.KeyValueWithPreviousEventConverterFactory)1 DefaultIterationManager (org.infinispan.server.hotrod.iteration.DefaultIterationManager)1