Interface IndexManagerImplementor
-
public interface IndexManagerImplementorThe 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
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description voidaddTo(IndexScopeBuilder builder)IndexIndexercreateIndexer(BackendSessionContext sessionContext)IndexIndexingPlancreateIndexingPlan(BackendSessionContext sessionContext, DocumentCommitStrategy commitStrategy, DocumentRefreshStrategy refreshStrategy)IndexScopeBuildercreateScopeBuilder(BackendMappingContext mappingContext)IndexWorkspacecreateWorkspace(DetachedBackendSessionContext sessionContext)default voidpreStart(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.CompletableFuture<?>preStop()Prepare forstop().default SavedStatesaveForRestart()IndexSchemaManagerschemaManager()voidstart(IndexManagerStartContext context)Start any resource necessary to operate the index manager at runtime.voidstop()Stop and release any resource necessary to operate the backend at runtime.IndexManagertoAPI()
-
-
-
Method Detail
-
saveForRestart
default SavedState saveForRestart()
-
preStart
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. 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
void start(IndexManagerStartContext context)
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
IndexIndexer createIndexer(BackendSessionContext sessionContext)
-
createWorkspace
IndexWorkspace createWorkspace(DetachedBackendSessionContext sessionContext)
-
createScopeBuilder
IndexScopeBuilder createScopeBuilder(BackendMappingContext mappingContext)
-
addTo
void addTo(IndexScopeBuilder builder)
-
-