public class SharedIndexWorkspaceImpl extends AbstractWorkspaceImpl
writerHolder
Constructor and Description |
---|
SharedIndexWorkspaceImpl(DirectoryBasedIndexManager indexManager,
WorkerBuildContext context,
Properties cfg) |
Modifier and Type | Method and Description |
---|---|
void |
afterTransactionApplied(boolean someFailureHappened,
boolean streaming)
Invoked after all changes of a transaction are applied.
|
void |
flush()
Makes sure eventually pending changes are made visible to IndexReaders.
|
IndexWriter |
getIndexWriter()
Gets the IndexWriter, opening one if needed.
|
IndexWriter |
getIndexWriter(ErrorContextBuilder errorContextBuilder) |
void |
notifyWorkApplied(LuceneWork work)
Some workspaces need this to determine for example the kind of flush operations which are safe
to apply.
|
areSingleTermDeletesSafe, getAnalyzer, getDocumentBuilder, getEntitiesInIndexManager, incrementModificationCounter, optimizerPhase, performOptimization, shutDownNow
public SharedIndexWorkspaceImpl(DirectoryBasedIndexManager indexManager, WorkerBuildContext context, Properties cfg)
public void afterTransactionApplied(boolean someFailureHappened, boolean streaming)
Workspace
Workspace.getIndexWriter()
in a finally block
as implementations might rely on counters to release the IndexWriter.afterTransactionApplied
in interface Workspace
afterTransactionApplied
in class AbstractWorkspaceImpl
someFailureHappened
- usually false, set to true if errors
where caught while using the IndexWriterstreaming
- if no immediate visibility of the change is required (hint for performance)public IndexWriter getIndexWriter()
Workspace
getIndexWriter
in interface Workspace
getIndexWriter
in class AbstractWorkspaceImpl
public IndexWriter getIndexWriter(ErrorContextBuilder errorContextBuilder)
getIndexWriter
in class AbstractWorkspaceImpl
public void flush()
Workspace
public void notifyWorkApplied(LuceneWork work)
Workspace
work
- the LuceneWork which was just processedCopyright © 2006-2014 Red Hat, Inc. All Rights Reserved