Interface AutomaticIndexingQueueEventProcessingPlan


public interface AutomaticIndexingQueueEventProcessingPlan
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    append(String entityName, String serializedId, org.hibernate.search.mapper.pojo.work.spi.PojoIndexingQueueEventPayload payload)
    Appends an event to the plan, received from a AutomaticIndexingQueueEventSendingPlan.
    CompletableFuture<org.hibernate.search.engine.backend.common.spi.MultiEntityOperationExecutionReport>
    executeAndReport(org.hibernate.search.engine.backend.work.execution.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.
  • Method Details

    • append

      void append(String entityName, String serializedId, org.hibernate.search.mapper.pojo.work.spi.PojoIndexingQueueEventPayload payload)
      Appends an event to the plan, received from a AutomaticIndexingQueueEventSendingPlan.
      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

      CompletableFuture<org.hibernate.search.engine.backend.common.spi.MultiEntityOperationExecutionReport> executeAndReport(org.hibernate.search.engine.backend.work.execution.OperationSubmitter operationSubmitter)
      Writes all pending changes to the index now, and clears the plan so that it can be re-used.
      Parameters:
      operationSubmitter - How to handle request to submit operation when the queue is full.
      Returns:
      A CompletableFuture that will be completed with an execution report when all the works are complete.
    • toSerializedId

      String toSerializedId(String entityName, Object identifier)
      Convert the identifier to its serialized form. The identifier type must be the one used by the entity having name entityName.
      Parameters:
      entityName - The name of the entity.
      identifier - The provided identifier.
      Returns:
      The serialized for of the provided identifier.
    • toIdentifier

      Object toIdentifier(String entityName, String serializedId)
      Convert the serialized id to the original identifier.
      Parameters:
      entityName - The name of the entity.
      serializedId - The serialized id.
      Returns:
      The original entity identifier.