org.apache.ignite.internal.maintenance

## Class MaintenanceFileStore

- java.lang.Object
- - org.apache.ignite.internal.maintenance.MaintenanceFileStore

    public class MaintenanceFileStore
    extends Object

Provides API for durable storage of `MaintenanceTask`s and hides implementation details from higher levels. Human-readable storage format is rigid but simple.

1. Maintenance file with tasks is stored in work directory of node under persistent store root defined by consistentId of node.
2. Each task is written to disk as a `String` on a separate line.
3. Task consists of two or three parts: task UUID, task description and optional parameters.

### Field Summary

Fields
`static String` `MAINTENANCE_FILE_NAME`

### Constructor Summary

Constructors
Constructor and Description
`MaintenanceFileStore(boolean disabled, PdsFoldersResolver pdsFoldersResolver, FileIOFactory ioFactory, IgniteLogger log)`

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `clear()` Deletes file with maintenance tasks.
`void` `deleteMaintenanceTask(String taskName)`
`Map<String,MaintenanceTask>` `getAllTasks()`
`void` `init()`
`void` `stop()` Stops
`void` `writeMaintenanceTask(MaintenanceTask task)`

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

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

### Field Detail

#### MAINTENANCE_FILE_NAME

    public static final String MAINTENANCE_FILE_NAME

See Also:
  Constant Field Values

### Constructor Detail

#### MaintenanceFileStore

    public MaintenanceFileStore(boolean disabled,
                                PdsFoldersResolver pdsFoldersResolver,
                                FileIOFactory ioFactory,
                                IgniteLogger log)

### Method Detail

#### init

    public void init()
              throws IgniteCheckedException,
                     IOException

Throws:
  `IgniteCheckedException`
  `IOException`

#### clear

    public void clear()

Deletes file with maintenance tasks.

#### stop

    public void stop()
              throws IOException

Stops

Throws:
  `IOException`

#### getAllTasks

    public Map<String,MaintenanceTask> getAllTasks()

#### writeMaintenanceTask

    public void writeMaintenanceTask(MaintenanceTask task)
                              throws IOException

Throws:
  `IOException`

#### deleteMaintenanceTask

    public void deleteMaintenanceTask(String taskName)
                               throws IOException

Throws:
  `IOException`

${current.year} Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Database and Caching Platform | : ver. 2.15.0
Release Date | : April 25 2023