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);
}
}
Aggregations