Interface CoordinationStrategy

  • public interface CoordinationStrategy
    The strategy for coordinating between threads of a single-node application, or between nodes of a distributed application.

    Advanced implementations may involve an external system to store and asynchronously consume indexing events, ultimately routing them back to Hibernate Search's in-JVM indexing plans.

    See Also:
    • Method Detail

      • configure

        void configure​(CoordinationConfigurationContext context)
        Configures coordination.

        Called once during bootstrap, before anything (mapper, backends, index managers) is started.

        context - The configuration context.
      • createMassIndexerAgent

        PojoMassIndexerAgent createMassIndexerAgent​(PojoMassIndexerAgentCreateContext context)
        Creates a PojoMassIndexerAgent, able to exert control over other agents that could perform indexing concurrently (e.g. automatic indexing).
        context - A context with information about the mass indexing that is about to start.
        An agent.
      • completion

        CompletableFuture<?> completion()
        A future that completes when all works submitted to background executors so far are completely executed. Works submitted to the executors after entering this method may delay the wait.
      • preStop

        CompletableFuture<?> preStop​(CoordinationStrategyPreStopContext context)
        Prepares for stop(), executing any operations that need to be executed before shutdown.

        Called once on shutdown, before backends and index managers are stopped.

        context - The pre-stop context.
        A future that completes when pre-stop operations complete.