* @throws InterruptedException if interrupted while waiting for endAllSignal.
*/
private void doBatchWork(BatchBackend backend) throws InterruptedException {
ExecutorService executor = Executors.newFixedThreadPool( rootEntities.length, "BatchIndexingWorkspace" );
for ( Class<?> type : rootEntities ) {
executor.execute(
new BatchIndexingWorkspace(
searchFactoryImplementor, sessionFactory, type,
objectLoadingThreads, collectionLoadingThreads,
cacheMode, objectLoadingBatchSize,
endAllSignal, monitor, backend, objectsLimit