public int getMaxQueueLength() { return asynchExecutor.getMaxQueueLength(); }
public void submitToAsyncIndexingExecutor(LuceneBackendQueueTask luceneBackendQueueProcessor) { asynchExecutor.submitTask( luceneBackendQueueProcessor ); } }
public void shutdown() { //need to close them in this specific order: try { asynchExecutor.flushCloseExecutor(); } finally { workspace.shutDownNow(); } }
LuceneBackendResources(WorkerBuildContext context, DirectoryBasedIndexManager indexManager, Properties props, AbstractWorkspaceImpl workspace) { this.indexName = indexManager.getIndexName(); this.indexManager = indexManager; this.errorHandler = context.getErrorHandler(); this.workspace = workspace; final ReentrantReadWriteLock indexReadWriteLock = new ReentrantReadWriteLock(); this.readLock = indexReadWriteLock.readLock(); this.writeLock = indexReadWriteLock.writeLock(); final int maxQueueLength = PropertiesParseHelper.extractMaxQueueSize( indexName, props ); this.asynchExecutor = new LazyExecutorHolder( maxQueueLength, indexName, "Index updates queue processor for index " + indexName ); }
public void shutdown() { //need to close them in this specific order: try { asynchExecutor.flushCloseExecutor(); } finally { workspace.shutDownNow(); } }
LuceneBackendResources(WorkerBuildContext context, DirectoryBasedIndexManager indexManager, Properties props, AbstractWorkspaceImpl workspace) { this.indexName = indexManager.getIndexName(); this.indexManager = indexManager; this.errorHandler = context.getErrorHandler(); this.workspace = workspace; final ReentrantReadWriteLock indexReadWriteLock = new ReentrantReadWriteLock(); this.readLock = indexReadWriteLock.readLock(); this.writeLock = indexReadWriteLock.writeLock(); final int maxQueueLength = PropertiesParseHelper.extractMaxQueueSize( indexName, props ); this.asynchExecutor = new LazyExecutorHolder( maxQueueLength, indexName, "Index updates queue processor for index " + indexName ); }
public void flushAndReleaseResources() { asynchExecutor.flushCloseExecutor(); workspace.getCommitPolicy().onClose(); workspace.closeIndexWriter(); }
public int getMaxQueueLength() { return asynchExecutor.getMaxQueueLength(); }
public void submitToAsyncIndexingExecutor(LuceneBackendQueueTask luceneBackendQueueProcessor) { asynchExecutor.submitTask( luceneBackendQueueProcessor ); } }
public void flushAndReleaseResources() { asynchExecutor.flushCloseExecutor(); workspace.getCommitPolicy().onClose(); workspace.closeIndexWriter(); }