public Set<Class<?>> getIndexedTypesPolymorphic(Class<?>[] classes) {
return indexHierarchy.getIndexedClasses( classes );
}
public BatchBackend makeBatchBackend(MassIndexerProgressMonitor progressMonitor, Integer forceToNumWriterThreads) {
final BatchBackend batchBackend;
String impl = configurationProperties.getProperty( Environment.BATCH_BACKEND );
if ( StringHelper.isEmpty( impl ) || "LuceneBatch".equalsIgnoreCase( impl ) ) {
batchBackend = new DefaultBatchBackend();
}
else {
batchBackend = ClassLoaderHelper.instanceFromName(
BatchBackend.class, impl, ImmutableSearchFactory.class,
"batchbackend"
);
}
Properties cfg = this.configurationProperties;
if ( forceToNumWriterThreads != null ) {
cfg = new Properties( cfg );
cfg.put( DefaultBatchBackend.CONCURRENT_WRITERS, forceToNumWriterThreads.toString() );
}
Properties batchBackendConfiguration = new MaskedProperty(
cfg, Environment.BATCH_BACKEND
);
batchBackend.initialize( batchBackendConfiguration, progressMonitor, this );
return batchBackend;
}