Class NoCoordinationStrategy
- java.lang.Object
-
- org.hibernate.search.mapper.orm.coordination.impl.NoCoordinationStrategy
-
- All Implemented Interfaces:
CoordinationStrategy
public class NoCoordinationStrategy extends Object implements CoordinationStrategy
-
-
Constructor Summary
Constructors Constructor Description NoCoordinationStrategy()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CompletableFuture<?>completion()voidconfigure(CoordinationConfigurationContext context)Configures coordination.PojoMassIndexerAgentcreateMassIndexerAgent(PojoMassIndexerAgentCreateContext context)Creates aPojoMassIndexerAgent, able to exert control over other agents that could perform indexing concurrently (e.g.CompletableFuture<?>preStop(CoordinationStrategyPreStopContext context)Prepares forCoordinationStrategy.stop(), executing any operations that need to be executed before shutdown.CompletableFuture<?>start(CoordinationStrategyStartContext context)Configures this strategy and starts processing events in the background.voidstop()Stops and releases all resources.
-
-
-
Field Detail
-
NAME
public static final String NAME
- See Also:
- Constant Field Values
-
-
Method Detail
-
start
public CompletableFuture<?> start(CoordinationStrategyStartContext context)
Description copied from interface:CoordinationStrategyConfigures this strategy and starts processing events in the background.Called once during bootstrap, after
CoordinationStrategy.configure(CoordinationConfigurationContext).- Specified by:
startin interfaceCoordinationStrategy- Parameters:
context- The start context.- Returns:
- A future that completes when the strategy is completely started.
-
configure
public void configure(CoordinationConfigurationContext context)
Description copied from interface:CoordinationStrategyConfigures coordination.Called once during bootstrap, before anything (mapper, backends, index managers) is started.
- Specified by:
configurein interfaceCoordinationStrategy- Parameters:
context- The configuration context.
-
createMassIndexerAgent
public PojoMassIndexerAgent createMassIndexerAgent(PojoMassIndexerAgentCreateContext context)
Description copied from interface:CoordinationStrategyCreates aPojoMassIndexerAgent, able to exert control over other agents that could perform indexing concurrently (e.g. background processing of entity change events with outbox-polling coordination strategy).- Specified by:
createMassIndexerAgentin interfaceCoordinationStrategy- Parameters:
context- A context with information about the mass indexing that is about to start.- Returns:
- An agent.
-
completion
public CompletableFuture<?> completion()
- Specified by:
completionin interfaceCoordinationStrategy- Returns:
- 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
public CompletableFuture<?> preStop(CoordinationStrategyPreStopContext context)
Description copied from interface:CoordinationStrategyPrepares forCoordinationStrategy.stop(), executing any operations that need to be executed before shutdown.Called once on shutdown, before backends and index managers are stopped.
- Specified by:
preStopin interfaceCoordinationStrategy- Parameters:
context- The pre-stop context.- Returns:
- A future that completes when pre-stop operations complete.
-
stop
public void stop()
Description copied from interface:CoordinationStrategyStops and releases all resources.Called once on shutdown, after the future returned by
CoordinationStrategy.preStop(CoordinationStrategyPreStopContext)completed.- Specified by:
stopin interfaceCoordinationStrategy
-
-