Interface IndexIndexingPlan

    • Method Detail

      • add

        void add​(DocumentReferenceProvider documentReferenceProvider,
                 DocumentContributor documentContributor)
        Add a document to the index, assuming that the document is absent from the index.
        Parameters:
        documentReferenceProvider - 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

        void addOrUpdate​(DocumentReferenceProvider documentReferenceProvider,
                         DocumentContributor documentContributor)
        Update a document in the index, or add it if it's absent from the index.
        Parameters:
        documentReferenceProvider - 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

        void delete​(DocumentReferenceProvider documentReferenceProvider)
        Delete a document from the index.
        Parameters:
        documentReferenceProvider - A source of information about the identity of the document to delete.
      • execute

        default CompletableFuture<?> execute()
        Start executing all the works in this plan, and clear the plan so that it can be re-used.
        Returns:
        A CompletableFuture that will be completed when all the works are complete. The future will be completed with an exception if a work failed.
      • executeAndReport

        <R> CompletableFuture<MultiEntityOperationExecutionReport<R>> executeAndReport​(EntityReferenceFactory<R> entityReferenceFactory)
        Start executing all the works in this plan, and clear the plan so that it can be re-used.
        Type Parameters:
        R - The type of entity references in the returned execution report.
        Parameters:
        entityReferenceFactory - A factory for entity references in the returned execution report.
        Returns:
        A CompletableFuture that 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

        void discard()
        Discard all works that are present in this plan.