Class RebuildOnStartedHandler
Handles how the indexes are rebuilt after startup.
Inheritance
object
Namespace: Umbraco.Cms.Infrastructure.Examine
Assembly: Umbraco.Infrastructure.dll
Syntax
public sealed class RebuildOnStartedHandler : INotificationAsyncHandler<UmbracoApplicationStartedNotification>, INotificationHandler
Remarks
Once the application has fully started this rebuilds the Examine indexes if they are empty. If it is a cold boot, they are all rebuilt.
Constructors
View SourceRebuildOnStartedHandler(ISyncBootStateAccessor, IIndexRebuilder, IRuntimeState)
Initializes a new instance of the RebuildOnStartedHandler class, responsible for handling index rebuilds during application startup.
Declaration
public RebuildOnStartedHandler(ISyncBootStateAccessor syncBootStateAccessor, IIndexRebuilder indexRebuilder, IRuntimeState runtimeState)
Parameters
| Type | Name | Description |
|---|---|---|
| ISyncBootStateAccessor | syncBootStateAccessor | Provides access to the application's synchronous boot state, used to determine if the system is ready for index rebuilding. |
| IIndexRebuilder | indexRebuilder | The service responsible for rebuilding Examine indexes. |
| IRuntimeState | runtimeState | Provides information about the current runtime state of the Umbraco application. |
Methods
View SourceHandleAsync(UmbracoApplicationStartedNotification, CancellationToken)
Once the application has fully started, schedule an index rebuild for any empty indexes (or all if it's a cold boot).
Declaration
public Task HandleAsync(UmbracoApplicationStartedNotification notification, CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| UmbracoApplicationStartedNotification | notification | The notification. |
| CancellationToken | cancellationToken | The cancellation token. |
Returns
| Type | Description |
|---|---|
| Task |