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
Constructors Constructor Description AutomaticIndexingQueueEventProcessingPlanImpl(PojoIndexingQueueEventProcessingPlan delegate)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidappend(String entityName, String serializedId, PojoIndexingQueueEventPayload payload)Appends an event to the plan, received from aAutomaticIndexingQueueEventSendingPlan.CompletableFuture<MultiEntityOperationExecutionReport>executeAndReport(OperationSubmitter operationSubmitter)Writes all pending changes to the index now, and clears the plan so that it can be re-used.ObjecttoIdentifier(String entityName, String serializedId)Convert the serialized id to the original identifier.StringtoSerializedId(String entityName, Object identifier)Convert the identifier to its serialized form.
-
-
-
Constructor Detail
-
AutomaticIndexingQueueEventProcessingPlanImpl
public AutomaticIndexingQueueEventProcessingPlanImpl(PojoIndexingQueueEventProcessingPlan delegate)
-
-
Method Detail
-
append
public void append(String entityName, String serializedId, PojoIndexingQueueEventPayload payload)
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:
AutomaticIndexingQueueEventSendingPlan.append(String, Object, String, PojoIndexingQueueEventPayload)
-
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
public String toSerializedId(String entityName, Object identifier)
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
public Object toIdentifier(String entityName, String serializedId)
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.
-
-