Class LuceneIndexIndexingPlan
java.lang.Object
org.hibernate.search.backend.lucene.work.execution.impl.LuceneIndexIndexingPlan
- All Implemented Interfaces:
IndexIndexingPlan
-
Constructor Summary
ConstructorsConstructorDescriptionLuceneIndexIndexingPlan(LuceneWorkFactory factory, WorkExecutionIndexManagerContext indexManagerContext, LuceneIndexEntryFactory indexEntryFactory, BackendSessionContext sessionContext, DocumentCommitStrategy commitStrategy, DocumentRefreshStrategy refreshStrategy) -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(DocumentReferenceProvider referenceProvider, DocumentContributor documentContributor) Add a document to the index, assuming that the document is absent from the index.voidaddOrUpdate(DocumentReferenceProvider referenceProvider, DocumentContributor documentContributor) Update a document in the index, or add it if it's absent from the index.voiddelete(DocumentReferenceProvider referenceProvider) Delete a document from the index.voiddiscard()Discard all works that are present in this plan.executeAndReport(OperationSubmitter operationSubmitter) Start executing all the works in this plan, and clear the plan so that it can be re-used.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.hibernate.search.engine.backend.work.execution.spi.IndexIndexingPlan
execute
-
Constructor Details
-
LuceneIndexIndexingPlan
public LuceneIndexIndexingPlan(LuceneWorkFactory factory, WorkExecutionIndexManagerContext indexManagerContext, LuceneIndexEntryFactory indexEntryFactory, BackendSessionContext sessionContext, DocumentCommitStrategy commitStrategy, DocumentRefreshStrategy refreshStrategy)
-
-
Method Details
-
add
public void add(DocumentReferenceProvider referenceProvider, DocumentContributor documentContributor) Description copied from interface:IndexIndexingPlanAdd a document to the index, assuming that the document is absent from the index.- Specified by:
addin interfaceIndexIndexingPlan- Parameters:
referenceProvider- A source of information about the identity of the document to add.documentContributor- A contributor to the document, adding fields to the indexed document.
-
addOrUpdate
public void addOrUpdate(DocumentReferenceProvider referenceProvider, DocumentContributor documentContributor) Description copied from interface:IndexIndexingPlanUpdate a document in the index, or add it if it's absent from the index.- Specified by:
addOrUpdatein interfaceIndexIndexingPlan- Parameters:
referenceProvider- A source of information about the identity of the document to update.documentContributor- A contributor to the document, adding fields to the indexed document.
-
delete
Description copied from interface:IndexIndexingPlanDelete a document from the index.- Specified by:
deletein interfaceIndexIndexingPlan- Parameters:
referenceProvider- A source of information about the identity of the document to delete.
-
executeAndReport
public CompletableFuture<MultiEntityOperationExecutionReport> executeAndReport(OperationSubmitter operationSubmitter) Description copied from interface:IndexIndexingPlanStart executing all the works in this plan, and clear the plan so that it can be re-used.- Specified by:
executeAndReportin interfaceIndexIndexingPlan- Parameters:
operationSubmitter- How to handle request to submit operation when the queue is full- Returns:
- A
CompletableFuturethat will hold an execution report when all the works are complete. The future will be completed normally even if a work failed, but the report will contain an exception.
-
discard
public void discard()Description copied from interface:IndexIndexingPlanDiscard all works that are present in this plan.- Specified by:
discardin interfaceIndexIndexingPlan
-