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