Class HibernateOrmIndexingQueueEventSendingPlan
java.lang.Object
org.hibernate.search.mapper.orm.automaticindexing.impl.HibernateOrmIndexingQueueEventSendingPlan
- All Implemented Interfaces:
PojoIndexingQueueEventSendingPlan
public class HibernateOrmIndexingQueueEventSendingPlan
extends Object
implements PojoIndexingQueueEventSendingPlan
-
Constructor Summary
ConstructorsConstructorDescription -
Method Summary
Modifier and TypeMethodDescriptionvoidappend(String entityName, Object identifier, String serializedId, PojoIndexingQueueEventPayload payload) Appends an event to the plan, to be sentlaterand ultimately added to aPojoIndexingQueueEventProcessingPlan.voiddiscard()Discards all events that were added to this plan, without sending them.sendAndReport(OperationSubmitter operationSubmitter) Sends the events to the queue.
-
Constructor Details
-
HibernateOrmIndexingQueueEventSendingPlan
-
-
Method Details
-
append
public void append(String entityName, Object identifier, String serializedId, PojoIndexingQueueEventPayload payload) Description copied from interface:PojoIndexingQueueEventSendingPlanAppends an event to the plan, to be sentlaterand ultimately added to aPojoIndexingQueueEventProcessingPlan.- Specified by:
appendin interfacePojoIndexingQueueEventSendingPlan- Parameters:
entityName- The name of the entity type.identifier- The non-serialized entity identifier, to report sending errors.serializedId- The serialized entity identifier.payload- A payload to be forwarded as-is to the processing plan.- See Also:
-
discard
public void discard()Description copied from interface:PojoIndexingQueueEventSendingPlanDiscards all events that were added to this plan, without sending them.- Specified by:
discardin interfacePojoIndexingQueueEventSendingPlan
-
sendAndReport
public CompletableFuture<MultiEntityOperationExecutionReport> sendAndReport(OperationSubmitter operationSubmitter) Description copied from interface:PojoIndexingQueueEventSendingPlanSends 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.
- Specified by:
sendAndReportin interfacePojoIndexingQueueEventSendingPlan- 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 events are sent. If sending an event failed, the future will be completed normally, but the report will contain an exception.
-