@Deprecated public interface Workspace
Modifier and Type | Method and Description |
---|---|
void |
afterTransactionApplied(boolean someFailureHappened,
boolean streaming)
Deprecated.
Invoked after all changes of a transaction are applied.
|
boolean |
areSingleTermDeletesSafe()
Deprecated.
Returns true if one and only one entity type is stored in the targeted index.
|
void |
flush()
Deprecated.
Makes sure eventually pending changes are made visible to IndexReaders.
|
Analyzer |
getAnalyzer(String name)
Deprecated.
|
CommitPolicy |
getCommitPolicy()
Deprecated.
Get the commit policy applied to the workspace
|
DocumentBuilderIndexedEntity |
getDocumentBuilder(Class<?> entity)
Deprecated.
|
Set<Class<?>> |
getEntitiesInIndexManager()
Deprecated.
|
String |
getIndexName()
Deprecated.
Returns the name of the index this workspace is being used for.
|
IndexWriter |
getIndexWriter()
Deprecated.
Gets the IndexWriter, opening one if needed.
|
boolean |
isDeleteByTermEnforced()
Deprecated.
Returns true if either the configuration guarantees that one can use delete by term on all indexes
or if we ensure that entity types stored in the index return positive to
IdUniquenessResolver
and that the document id and JPA id are the same property. |
void |
notifyWorkApplied(LuceneWork work)
Deprecated.
Some workspaces need this to determine for example the kind of flush operations which are safe
to apply.
|
void |
optimizerPhase()
Deprecated.
If optimization has not been forced give a chance to configured OptimizerStrategy
to optimize the index.
|
void |
performOptimization(IndexWriter writer)
Deprecated.
Used by OptimizeLuceneWork to start an optimization process of the index.
|
DocumentBuilderIndexedEntity getDocumentBuilder(Class<?> entity)
void optimizerPhase()
void performOptimization(IndexWriter writer)
writer
- the IndexWriter to use for optimizationOptimizeLuceneWork
,
SearchIntegrator.optimize()
,
SearchIntegrator.optimize(Class)
IndexWriter getIndexWriter()
Set<Class<?>> getEntitiesInIndexManager()
void afterTransactionApplied(boolean someFailureHappened, boolean streaming)
getIndexWriter()
in a finally block
as implementations might rely on counters to release the IndexWriter.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)void flush()
boolean areSingleTermDeletesSafe()
isSingleClassInIndex
but that's a public contract.boolean isDeleteByTermEnforced()
IdUniquenessResolver
and that the document id and JPA id are the same property.
This allows to use delete by identifier term in a safe way and is much more efficient.
If unsure, we will delete taking the class field into account to avoid unwanted document deletions.
The method should really be named isDeleteByTermEnforcedOrSafe
but that's a public contract.void notifyWorkApplied(LuceneWork work)
work
- the LuceneWork which was just processedCommitPolicy getCommitPolicy()
CommitPolicy
String getIndexName()
Copyright © 2006-2017 Red Hat, Inc. All Rights Reserved