Class PojoIndexingQueueEventProcessingPlanImpl
java.lang.Object
org.hibernate.search.mapper.pojo.work.impl.PojoIndexingQueueEventProcessingPlanImpl
- All Implemented Interfaces:
PojoIndexingQueueEventProcessingPlan
public final class PojoIndexingQueueEventProcessingPlanImpl
extends Object
implements PojoIndexingQueueEventProcessingPlan
-
Constructor Summary
ConstructorsConstructorDescriptionPojoIndexingQueueEventProcessingPlanImpl(PojoWorkTypeContextProvider typeContextProvider, PojoWorkSessionContext sessionContext, PojoIndexingPlan delegate) -
Method Summary
Modifier and TypeMethodDescriptionvoidappend(String entityName, String serializedId, PojoIndexingQueueEventPayload payload) Appends an event to the plan, received from aPojoIndexingQueueEventSendingPlan.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.<I> StringtoSerializedId(String entityName, I identifier) Convert the identifier to its serialized form.
-
Constructor Details
-
PojoIndexingQueueEventProcessingPlanImpl
public PojoIndexingQueueEventProcessingPlanImpl(PojoWorkTypeContextProvider typeContextProvider, PojoWorkSessionContext sessionContext, PojoIndexingPlan delegate)
-
-
Method Details
-
append
Description copied from interface:PojoIndexingQueueEventProcessingPlanAppends an event to the plan, received from aPojoIndexingQueueEventSendingPlan.- Specified by:
appendin interfacePojoIndexingQueueEventProcessingPlan- 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:PojoIndexingQueueEventProcessingPlanWrites all pending changes to the index now, and clears the plan so that it can be re-used.- Specified by:
executeAndReportin interfacePojoIndexingQueueEventProcessingPlan- 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:PojoIndexingQueueEventProcessingPlanConvert the identifier to its serialized form. The identifier type must be the one used by the entity having nameentityName.- Specified by:
toSerializedIdin interfacePojoIndexingQueueEventProcessingPlan- Type Parameters:
I- The type of the identifier of the entity.- Parameters:
entityName- The name of the entity.identifier- The provided identifier.- Returns:
- The serialized form of the provided identifier.
-
toIdentifier
Description copied from interface:PojoIndexingQueueEventProcessingPlanConvert the serialized id to the original identifier.- Specified by:
toIdentifierin interfacePojoIndexingQueueEventProcessingPlan- Parameters:
entityName- The name of the entity.serializedId- The serialized id.- Returns:
- The original entity identifier.
-