protected MassIndexerImpl(SearchFactoryImplementor searchFactory, SessionFactoryImplementor sessionFactory, Class<?>... entities) {
this.searchFactoryImplementor = searchFactory;
this.sessionFactory = sessionFactory;
rootEntities = toRootEntities( searchFactoryImplementor, entities );
if ( searchFactoryImplementor.isJMXEnabled() ) {
monitor = new IndexingProgressMonitor();
}
else {
monitor = new SimpleIndexingProgressMonitor();
}
}