Class AutomaticIndexingQueueEventProcessingPlanImpl
java.lang.Object
org.hibernate.search.mapper.orm.automaticindexing.impl.AutomaticIndexingQueueEventProcessingPlanImpl
- All Implemented Interfaces:
AutomaticIndexingQueueEventProcessingPlan
public class AutomaticIndexingQueueEventProcessingPlanImpl
extends Object
implements AutomaticIndexingQueueEventProcessingPlan
-
Constructor Summary
ConstructorsConstructorDescription -
Method Summary
Modifier and TypeMethodDescriptionvoidappend(String entityName, String serializedId, PojoIndexingQueueEventPayload payload) Appends an event to the plan, received from aAutomaticIndexingQueueEventSendingPlan.executeAndReport(OperationSubmitter operationSubmitter) Writes all pending changes to the index now, and clears the plan so that it can be re-used.toIdentifier(String entityName, String serializedId) Convert the serialized id to the original identifier.toSerializedId(String entityName, Object identifier) Convert the identifier to its serialized form.
-
Constructor Details
-
AutomaticIndexingQueueEventProcessingPlanImpl
-
-
Method Details
-
append
Description copied from interface:AutomaticIndexingQueueEventProcessingPlanAppends an event to the plan, received from aAutomaticIndexingQueueEventSendingPlan.- Specified by:
appendin interfaceAutomaticIndexingQueueEventProcessingPlan- Parameters:
entityName- The name of the entity type.serializedId- The serialized entity identifier.payload- The payload as passed to the sending plan.- See Also:
-
executeAndReport
public CompletableFuture<MultiEntityOperationExecutionReport> executeAndReport(OperationSubmitter operationSubmitter) Description copied from interface:AutomaticIndexingQueueEventProcessingPlanWrites all pending changes to the index now, and clears the plan so that it can be re-used.- Specified by:
executeAndReportin interfaceAutomaticIndexingQueueEventProcessingPlan- Parameters:
operationSubmitter- How to handle request to submit operation when the queue is full.- Returns:
- A
CompletableFuturethat will be completed with an execution report when all the works are complete.
-
toSerializedId
Description copied from interface:AutomaticIndexingQueueEventProcessingPlanConvert the identifier to its serialized form. The identifier type must be the one used by the entity having nameentityName.- Specified by:
toSerializedIdin interfaceAutomaticIndexingQueueEventProcessingPlan- Parameters:
entityName- The name of the entity.identifier- The provided identifier.- Returns:
- The serialized for of the provided identifier.
-
toIdentifier
Description copied from interface:AutomaticIndexingQueueEventProcessingPlanConvert the serialized id to the original identifier.- Specified by:
toIdentifierin interfaceAutomaticIndexingQueueEventProcessingPlan- Parameters:
entityName- The name of the entity.serializedId- The serialized id.- Returns:
- The original entity identifier.
-