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
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description void
addTo(IndexScopeBuilder builder)
IndexIndexer
createIndexer(BackendSessionContext sessionContext)
IndexIndexingPlan
createIndexingPlan(BackendSessionContext sessionContext, DocumentCommitStrategy commitStrategy, DocumentRefreshStrategy refreshStrategy)
IndexScopeBuilder
createScopeBuilder(BackendMappingContext mappingContext)
IndexWorkspace
createWorkspace(DetachedBackendSessionContext sessionContext)
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.CompletableFuture<?>
preStop()
Prepare forstop()
.default SavedState
saveForRestart()
IndexSchemaManager
schemaManager()
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.IndexManager
toAPI()
-
-
-
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)
-
-