private final boolean exclusiveIndexUsage;
private final ErrorHandler errorHandler;
PerDPResources(WorkerBuildContext context, DirectoryProvider<?> dp) {
workspace = new Workspace( context, dp );
visitor = new LuceneWorkVisitor( workspace, context );
executor = Executors.newFixedThreadPool( 1, "Directory writer" );
exclusiveIndexUsage = context.isExclusiveIndexUsageEnabled( dp );
errorHandler = context.getErrorHandler();
}