Interface IndexManagerImplementor
public interface IndexManagerImplementor
The object responsible for applying works and searches to a full-text index.
This is the interface implemented by backends and provided to the engine.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addTo
(IndexScopeBuilder builder) createIndexer
(BackendSessionContext sessionContext) createIndexingPlan
(BackendSessionContext sessionContext, DocumentCommitStrategy commitStrategy, DocumentRefreshStrategy refreshStrategy) createScopeBuilder
(BackendMappingContext mappingContext) createWorkspace
(BackendMappingContext mappingContext, Set<String> tenantId) default void
preStart
(IndexManagerStartContext context, SavedState savedState) Starts a subset of resources that are necessary to operate the index manager at runtime, and are expected to be reused upon restarts.preStop()
Prepare forstop()
.default SavedState
void
start
(IndexManagerStartContext context) Start any resource necessary to operate the index manager at runtime.void
stop()
Stop and release any resource necessary to operate the backend at runtime.toAPI()
-
Method Details
-
saveForRestart
-
preStart
Starts a subset of resources that are necessary to operate the index manager at runtime, and are expected to be reused upon restarts. The resources may be retrieved them from the saved state, or created if they are not present in the saved state.Called by the engine once after bootstrap, after
BackendImplementor.start(BackendStartContext)
was called on the corresponding backend.- Parameters:
context
- The start context.savedState
- The saved state returned by the corresponding index manager in the Hibernate Search integration being restarted, orSavedState.empty()
on the first start.
-
start
Start any resource necessary to operate the index manager at runtime.Called by the engine once just after
preStart(IndexManagerStartContext, SavedState)
.- Parameters:
context
- The start context.
-
preStop
CompletableFuture<?> preStop()Prepare forstop()
.- Returns:
- A future that completes when ongoing works complete.
-
stop
void stop()Stop and release any resource necessary to operate the backend at runtime.Called by the engine once before shutdown.
-
toAPI
IndexManager toAPI()- Returns:
- The object that should be exposed as API to users.
-
schemaManager
IndexSchemaManager schemaManager() -
createIndexingPlan
IndexIndexingPlan createIndexingPlan(BackendSessionContext sessionContext, DocumentCommitStrategy commitStrategy, DocumentRefreshStrategy refreshStrategy) -
createIndexer
-
createWorkspace
-
createScopeBuilder
-
addTo
-