protected MassIndexerImpl( SearchIntegrator searchIntegrator, SessionFactoryImplementor sessionFactory, Class<?>... entities) { this.extendedIntegrator = searchIntegrator.unwrap(ExtendedSearchIntegrator.class); this.sessionFactory = sessionFactory; rootEntities = toRootEntities(extendedIntegrator, entities); if (extendedIntegrator.isJMXEnabled()) { monitor = new JMXRegistrar.IndexingProgressMonitor(); } else { monitor = new SimpleIndexingProgressMonitor(); } }