Class MaintenanceFileStore
- java.lang.Object
-
- org.apache.ignite.internal.maintenance.MaintenanceFileStore
-
public class MaintenanceFileStore extends Object
Provides API for durable storage ofMaintenanceTasks and hides implementation details from higher levels. Human-readable storage format is rigid but simple.- Maintenance file with tasks is stored in work directory of node under persistent store root defined by consistentId of node.
-
Each task is written to disk as a
Stringon a separate line. - Task consists of two or three parts: task UUID, task description and optional parameters.
-
-
Field Summary
Fields Modifier and Type Field Description static StringMAINTENANCE_FILE_NAME
-
Constructor Summary
Constructors Constructor Description MaintenanceFileStore(boolean disabled, PdsFoldersResolver pdsFoldersResolver, FileIOFactory ioFactory, IgniteLogger log)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclear()Deletes file with maintenance tasks.voiddeleteMaintenanceTask(String taskName)Map<String,MaintenanceTask>getAllTasks()voidinit()voidstop()StopsvoidwriteMaintenanceTask(MaintenanceTask task)
-
-
-
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:
IgniteCheckedExceptionIOException
-
clear
public void clear()
Deletes file with maintenance tasks.
-
stop
public void stop() throws IOExceptionStops- 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
-
-