Package org.apache.ignite.maintenance
Interface MaintenanceWorkflowCallback
-
public interface MaintenanceWorkflowCallback
Abstraction to decouple interaction betweenMaintenanceRegistry
and components that may require maintenance. If a component may cause node to enter maintenance mode, it should register this callback inMaintenanceRegistry
using methodMaintenanceRegistry.registerWorkflowCallback(String, MaintenanceWorkflowCallback)
MaintenanceRegistry
during its workflow will collect necessary information about maintenance for components without knowing implementation details of the components.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description @NotNull List<MaintenanceAction<?>>
allActions()
Supplies list ofMaintenanceAction
s that user can call to fix maintenance situation for the component or get information about ongoing actions.@Nullable MaintenanceAction<?>
automaticAction()
Component can provide optionalMaintenanceAction
that will be executed automatically byMaintenanceRegistry
when node enters maintenance mode.boolean
shouldProceedWithMaintenance()
Called byMaintenanceRegistry
and enables it to check if maintenance is still needed for component that provided this callback.
-
-
-
Method Detail
-
shouldProceedWithMaintenance
boolean shouldProceedWithMaintenance()
Called byMaintenanceRegistry
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.- Returns:
True
if maintenance is still needed for the component.
-
allActions
@NotNull @NotNull List<MaintenanceAction<?>> allActions()
Supplies list ofMaintenanceAction
s that user can call to fix maintenance situation for the component or get information about ongoing actions. Should not be null or empty.- Returns:
- Not null and non-empty
List
ofMaintenanceAction
.
-
automaticAction
@Nullable @Nullable MaintenanceAction<?> automaticAction()
Component can provide optionalMaintenanceAction
that will be executed automatically byMaintenanceRegistry
when node enters maintenance mode. If no automatic actions are providedMaintenanceRegistry
will wait for user to triggerMaintenanceAction
with logic to fix the maintenance situation.- Returns:
MaintenanceAction
for automatic execution or null if maintenance situation should not be fixed automatically.
-
-