org.apache.ignite.internal.cache.query.index.sorted.maintenance

## Class RebuildIndexWorkflowCallback

- java.lang.Object
- - org.apache.ignite.internal.cache.query.index.sorted.maintenance.RebuildIndexWorkflowCallback

All Implemented Interfaces:
  MaintenanceWorkflowCallback

    public class RebuildIndexWorkflowCallback
    extends Object
    implements MaintenanceWorkflowCallback

Workflow for the index rebuild maintenance task.

### Constructor Summary

Constructors
Constructor and Description
`RebuildIndexWorkflowCallback(List<MaintenanceRebuildIndexTarget> indexesToRebuild, GridKernalContext ctx)` Constructor.

### Method Summary

All Methods Instance Methods Concrete Methods
`List<MaintenanceAction<?>>` `allActions()` Supplies list of `MaintenanceAction`s that user can call to fix maintenance situation for the component or get information about ongoing actions.
`@Nullable MaintenanceAction<?>` `automaticAction()` Component can provide optional `MaintenanceAction` that will be executed automatically by `MaintenanceRegistry` when node enters maintenance mode.
`boolean` `shouldProceedWithMaintenance()` Called by `MaintenanceRegistry` and enables it to check if maintenance is still needed for component that provided this callback.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### RebuildIndexWorkflowCallback

    public RebuildIndexWorkflowCallback(List<MaintenanceRebuildIndexTarget> indexesToRebuild,
                                        GridKernalContext ctx)

Constructor.

Parameters:
  `indexesToRebuild` - Indexes to rebuild.
  `ctx` - Context.

### Method Detail

#### shouldProceedWithMaintenance

    public boolean shouldProceedWithMaintenance()

Called by `MaintenanceRegistry` and enables it to check if maintenance is still needed for component that provided this callback. User may fix maintenance situation by hand when node was down thus before going to maintenance mode we should be able to check if it is still necessary.

Specified by:
  `shouldProceedWithMaintenance` in interface `MaintenanceWorkflowCallback`
Returns:
  `True` if maintenance is still needed for the component.

#### allActions

    public List<MaintenanceAction<?>> allActions()

Supplies list of `MaintenanceAction`s that user can call to fix maintenance situation for the component or get information about ongoing actions. Should not be null or empty.

Specified by:
  `allActions` in interface `MaintenanceWorkflowCallback`
Returns:
  Not null and non-empty `List` of `MaintenanceAction`.

#### automaticAction

    @Nullable
    public @Nullable MaintenanceAction<?> automaticAction()

Component can provide optional `MaintenanceAction` that will be executed automatically by `MaintenanceRegistry` when node enters maintenance mode. If no automatic actions are provided `MaintenanceRegistry` will wait for user to trigger `MaintenanceAction` with logic to fix the maintenance situation.

Specified by:
  `automaticAction` in interface `MaintenanceWorkflowCallback`
Returns:
  `MaintenanceAction` for automatic execution or null if maintenance situation should not be fixed automatically.

${current.year} Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Database and Caching Platform | : ver. 2.14.0
Release Date | : September 29 2022