Interface PojoIndexingQueueEventSendingPlan


  • public interface PojoIndexingQueueEventSendingPlan
    A set of indexing events to be sent to an external queue.

    The external queue will be consumed by a background process which will then perform the indexing operations asynchronously.

    • Method Detail

      • discard

        void discard()
        Discards all events that were added to this plan, without sending them.
      • sendAndReport

        <R> CompletableFuture<MultiEntityOperationExecutionReport<R>> sendAndReport​(EntityReferenceFactory<R> entityReferenceFactory)
        Sends the events to the queue.

        When the returned future completes, events are guaranteed to be stored in secure storage in such a way that they will eventually be processed.

        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 events are sent. If sending an event failed, the future will be completed normally, but the report will contain an exception.