Search in sources :

Example 1 with SearchStatsRetriever

use of org.infinispan.query.core.stats.impl.SearchStatsRetriever in project infinispan by infinispan.

the class LifecycleManager method cacheStarting.

@Override
public void cacheStarting(ComponentRegistry cr, Configuration cfg, String cacheName) {
    InternalCacheRegistry icr = cr.getGlobalComponentRegistry().getComponent(InternalCacheRegistry.class);
    if (!icr.isInternalCache(cacheName) || icr.internalCacheHasFlag(cacheName, Flag.QUERYABLE)) {
        cr.registerComponent(new IndexStatisticsSnapshotImpl(), IndexStatistics.class);
        cr.registerComponent(new LocalQueryStatistics(), LocalQueryStatistics.class);
        cr.registerComponent(new SearchStatsRetriever(), SearchStatsRetriever.class);
        AdvancedCache<?, ?> cache = cr.getComponent(Cache.class).getAdvancedCache();
        ClassLoader aggregatedClassLoader = makeAggregatedClassLoader(cr.getGlobalComponentRegistry().getGlobalConfiguration().classLoader());
        cr.registerComponent(new ReflectionMatcher(aggregatedClassLoader), ReflectionMatcher.class);
        cr.registerComponent(new QueryEngine<>(cache), QueryEngine.class);
    }
}
Also used : IndexStatisticsSnapshotImpl(org.infinispan.query.core.stats.impl.IndexStatisticsSnapshotImpl) AggregatedClassLoader(org.infinispan.commons.util.AggregatedClassLoader) InternalCacheRegistry(org.infinispan.registry.InternalCacheRegistry) LocalQueryStatistics(org.infinispan.query.core.stats.impl.LocalQueryStatistics) ReflectionMatcher(org.infinispan.objectfilter.impl.ReflectionMatcher) SearchStatsRetriever(org.infinispan.query.core.stats.impl.SearchStatsRetriever) Cache(org.infinispan.Cache) AdvancedCache(org.infinispan.AdvancedCache)

Aggregations

AdvancedCache (org.infinispan.AdvancedCache)1 Cache (org.infinispan.Cache)1 AggregatedClassLoader (org.infinispan.commons.util.AggregatedClassLoader)1 ReflectionMatcher (org.infinispan.objectfilter.impl.ReflectionMatcher)1 IndexStatisticsSnapshotImpl (org.infinispan.query.core.stats.impl.IndexStatisticsSnapshotImpl)1 LocalQueryStatistics (org.infinispan.query.core.stats.impl.LocalQueryStatistics)1 SearchStatsRetriever (org.infinispan.query.core.stats.impl.SearchStatsRetriever)1 InternalCacheRegistry (org.infinispan.registry.InternalCacheRegistry)1