public void applyStreamWork(LuceneWork singleOperation, IndexingMonitor monitor) { if ( singleOperation == null ) { throw new IllegalArgumentException( "singleOperation should not be null" ); } streamWorker.doWork( singleOperation, monitor ); }
public void initialize(Properties props, WorkerBuildContext context, IndexManager indexManager) { sync = BackendFactory.isConfiguredAsSync( props ); if ( workspaceOverride == null ) { workspaceOverride = WorkspaceFactory.createWorkspace( (DirectoryBasedIndexManager) indexManager, context, props ); } resources = new LuceneBackendResources( context, (DirectoryBasedIndexManager) indexManager, props, workspaceOverride ); streamWorker = new LuceneBackendTaskStreamer( resources ); String indexName = indexManager.getIndexName(); if ( sync ) { final SyncWorkProcessor batchSyncProcessor = new SyncWorkProcessor( resources, indexName ); batchSyncProcessor.start(); log.luceneBackendInitializedSynchronously( indexName ); workProcessor = batchSyncProcessor; } else { workProcessor = new AsyncWorkProcessor( resources ); log.luceneBackendInitializedAsynchronously( indexName ); } }
public void initialize(Properties props, WorkerBuildContext context, IndexManager indexManager) { sync = BackendFactory.isConfiguredAsSync( props ); if ( workspaceOverride == null ) { workspaceOverride = WorkspaceFactory.createWorkspace( (DirectoryBasedIndexManager) indexManager, context, props ); } resources = new LuceneBackendResources( context, (DirectoryBasedIndexManager) indexManager, props, workspaceOverride ); streamWorker = new LuceneBackendTaskStreamer( resources ); String indexName = indexManager.getIndexName(); if ( sync ) { final SyncWorkProcessor batchSyncProcessor = new SyncWorkProcessor( resources, indexName ); batchSyncProcessor.start(); log.luceneBackendInitializedSynchronously( indexName ); workProcessor = batchSyncProcessor; } else { workProcessor = new AsyncWorkProcessor( resources ); log.luceneBackendInitializedAsynchronously( indexName ); } }
public void applyStreamWork(LuceneWork singleOperation, IndexingMonitor monitor) { if ( singleOperation == null ) { throw new IllegalArgumentException( "singleOperation should not be null" ); } streamWorker.doWork( singleOperation, monitor ); }