Package org.apache.ignite.maintenance
Class MaintenanceTask
- java.lang.Object
-
- org.apache.ignite.maintenance.MaintenanceTask
-
public class MaintenanceTask extends Object
Represents request to handle maintenance situation. Maintenance request can be created programmatically withMaintenanceRegistry.registerMaintenanceTask(MaintenanceTask)
public API call. Lifecycle of Maintenance Task is managed byMaintenanceRegistry
. Task contains unique ID of maintenance situation (e.g. situation of PDS corruption or defragmentation), description of task and optional parameters. When task is created node should be restarted to enter maintenance mode. In that mode node can start actions needed to resolve maintenance situation or wait for user to trigger them. Components that may need to perform maintenance actions as part of their recovery workflow should check maintenance status on startup and supplyMaintenanceWorkflowCallback
implementation toMaintenanceRegistry.registerWorkflowCallback(String, MaintenanceWorkflowCallback)
to allow Maintenance Registry to find maintenance actions and start them automatically or by user request. Matching betweenMaintenanceTask
andMaintenanceWorkflowCallback
is performed based on the name of maintenance task that should be unique among all registered tasks.
-
-
Constructor Summary
Constructors Constructor Description MaintenanceTask(@NotNull String name, @NotNull String description, @Nullable String params)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description @NotNull String
description()
@NotNull String
name()
@Nullable String
parameters()
-
-
-
Constructor Detail
-
MaintenanceTask
public MaintenanceTask(@NotNull @NotNull String name, @NotNull @NotNull String description, @Nullable @Nullable String params)
- Parameters:
name
- Mandatory name of maintenance task. Name should be unique among all other tasks.description
- Mandatory description of maintenance situation.params
- Optional parameters that may be needed to perform maintenance actions.
-
-
Method Detail
-
name
@NotNull public @NotNull String name()
- Returns:
- Name of Maintenance Task unique among all registered tasks.
-
description
@NotNull public @NotNull String description()
- Returns:
- Human-readable not-nullable description of the task.
-
parameters
@Nullable public @Nullable String parameters()
- Returns:
- Optional parameters that could be used by actions associated with this Maintenance Task.
-
-