public IndexWriterDelegate getIndexWriterDelegate() { IndexWriter indexWriter = getIndexWriter(); //This to respect the existing semantics of returning null on failure of IW opening if ( indexWriter != null ) { return new IndexWriterDelegate( indexWriter ); } else { return null; } }
public void flushAndReleaseResources() { asynchExecutor.flushCloseExecutor(); workspace.getCommitPolicy().onClose(); workspace.closeIndexWriter(); }
@Override public boolean areSingleTermDeletesSafe() { return indexMetadataIsComplete && getEntitiesInIndexManager().size() == 1; }
errorContextBuilder.allWorkToBeDone( workList ); IndexWriterDelegate delegate = workspace.getIndexWriterDelegate( errorContextBuilder ); if ( delegate == null ) { log.cannotOpenIndexWriterCausePreviousError(); workspace.optimizerPhase(); someFailureHappened = false; workspace.afterTransactionApplied( someFailureHappened, false );
@Override public void flush() { getCommitPolicy().onFlush(); }
public void doWork(final LuceneWork work, final IndexingMonitor monitor) { modificationLock.lock(); try { IndexWriterDelegate delegate = workspace.getIndexWriterDelegate(); if ( delegate == null ) { log.cannotOpenIndexWriterCausePreviousError(); return; } boolean errors = true; try { LuceneWorkExecutor executor = work.acceptIndexWorkVisitor( resources.getWorkVisitor(), null ); executor.performWork( work, delegate, monitor ); errors = false; } finally { workspace.afterTransactionApplied( errors, true ); } } finally { modificationLock.unlock(); } }
public void shutdown() { //need to close them in this specific order: try { asynchExecutor.flushCloseExecutor(); } finally { workspace.shutDownNow(); } }
errorContextBuilder.allWorkToBeDone( workList ); IndexWriterDelegate delegate = workspace.getIndexWriterDelegate( errorContextBuilder ); if ( delegate == null ) { log.cannotOpenIndexWriterCausePreviousError(); workspace.optimizerPhase(); someFailureHappened = false; workspace.afterTransactionApplied( someFailureHappened, false );
@Override public void afterTransactionApplied(boolean someFailureHappened, boolean streaming) { getCommitPolicy().onChangeSetApplied( someFailureHappened, streaming ); }
public void doWork(final LuceneWork work, final IndexingMonitor monitor) { modificationLock.lock(); try { IndexWriterDelegate delegate = workspace.getIndexWriterDelegate(); if ( delegate == null ) { log.cannotOpenIndexWriterCausePreviousError(); return; } boolean errors = true; try { LuceneWorkExecutor executor = work.acceptIndexWorkVisitor( resources.getWorkVisitor(), null ); executor.performWork( work, delegate, monitor ); errors = false; } finally { workspace.afterTransactionApplied( errors, true ); } } finally { modificationLock.unlock(); } }
public void shutdown() { //need to close them in this specific order: try { asynchExecutor.flushCloseExecutor(); } finally { workspace.shutDownNow(); } }
public IndexWriterDelegate getIndexWriterDelegate(ErrorContextBuilder errorContextBuilder) { IndexWriter indexWriter = getIndexWriter( errorContextBuilder ); //This to respect the existing semantics of returning null on failure of IW opening if ( indexWriter != null ) { return new IndexWriterDelegate( indexWriter ); } else { return null; } }
public void flushAndReleaseResources() { asynchExecutor.flushCloseExecutor(); workspace.getCommitPolicy().onClose(); workspace.closeIndexWriter(); }
@Override public void afterTransactionApplied(boolean someFailureHappened, boolean streaming) { getCommitPolicy().onChangeSetApplied( someFailureHappened, streaming ); }
@Override public boolean areSingleTermDeletesSafe() { return indexMetadataIsComplete && getEntitiesInIndexManager().size() == 1; }
public IndexWriterDelegate getIndexWriterDelegate() { IndexWriter indexWriter = getIndexWriter(); //This to respect the existing semantics of returning null on failure of IW opening if ( indexWriter != null ) { return new IndexWriterDelegate( indexWriter ); } else { return null; } }
public void shutDownNow() { getCommitPolicy().onClose(); log.shuttingDownBackend( indexManager.getIndexName() ); closeIndexWriter(); }
@Override public void flush() { getCommitPolicy().onFlush(); }
IndexedTypeSet entitiesInvolved = getEntitiesInIndexManager();
public IndexWriterDelegate getIndexWriterDelegate(ErrorContextBuilder errorContextBuilder) { IndexWriter indexWriter = getIndexWriter( errorContextBuilder ); //This to respect the existing semantics of returning null on failure of IW opening if ( indexWriter != null ) { return new IndexWriterDelegate( indexWriter ); } else { return null; } }