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 with `MaintenanceRegistry.registerMaintenanceTask(MaintenanceTask)` public API call. Lifecycle of Maintenance Task is managed by `MaintenanceRegistry`. 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 supply `MaintenanceWorkflowCallback` implementation to `MaintenanceRegistry.registerWorkflowCallback(String, MaintenanceWorkflowCallback)` to allow Maintenance Registry to find maintenance actions and start them automatically or by user request. Matching between `MaintenanceTask` and `MaintenanceWorkflowCallback` is performed based on the name of maintenance task that should be unique among all registered tasks.

### Constructor Summary

Constructors
Constructor and Description
`MaintenanceTask(@NotNull String name, @NotNull String description, @Nullable String params)`

### Method Summary

All Methods Instance Methods Concrete Methods
`@NotNull String` `description()`
`@NotNull String` `name()`
`@Nullable String` `parameters()`

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

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

### 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.

${current.year} Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Database and Caching Platform | : ver. 2.11.0
Release Date | : September 11 2021