public class MaintenanceProcessor extends GridProcessorAdapter implements MaintenanceRegistry
GridComponent.DiscoveryDataExchangeTypectx, diagnosticLog, log| Constructor and Description |
|---|
MaintenanceProcessor(GridKernalContext ctx) |
| Modifier and Type | Method and Description |
|---|---|
List<MaintenanceAction<?>> |
actionsForMaintenanceTask(String maintenanceTaskName)
All
MaintenanceActions provided by a component for MaintenanceTask with a given name. |
@Nullable MaintenanceTask |
activeMaintenanceTask(String maitenanceTaskName)
Returns active
MaintenanceTask by its name. |
boolean |
isMaintenanceMode() |
void |
prepareAndExecuteMaintenance()
Examine all components if they need to execute maintenance actions.
|
@Nullable MaintenanceTask |
registerMaintenanceTask(MaintenanceTask task)
Method to register
MaintenanceTask locally on the node where method is called. |
void |
registerWorkflowCallback(@NotNull String maintenanceTaskName,
@NotNull MaintenanceWorkflowCallback cb)
Registers
MaintenanceWorkflowCallback for a MaintenanceTask with a given name. |
void |
start()
Starts grid component.
|
void |
stop(boolean cancel)
Stops grid component.
|
boolean |
unregisterMaintenanceTask(String maintenanceTaskName)
Deletes
MaintenanceTask of given ID from maintenance registry. |
assertParameter, collectGridNodeData, collectJoiningNodeData, discoveryDataType, onDisconnected, onGridDataReceived, onJoiningNodeDataReceived, onKernalStart, onKernalStop, onReconnected, printMemoryStats, toString, validateNode, validateNodeclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitregisterWorkflowCallbackIfTaskExistspublic MaintenanceProcessor(GridKernalContext ctx)
ctx - Kernal context.@Nullable public @Nullable MaintenanceTask registerMaintenanceTask(MaintenanceTask task) throws IgniteCheckedException
MaintenanceTask locally on the node where method is called.
For now it is not allowed to register new Maintenance Tasks in Maintenance Mode so this method should be called only when node operates normally. This may change in the future so it will become possible to create other maintenance tasks on node that is already entered Maintenance Mode.
When task is registered node continues to operate normally and will enter Maintenance Mode only after restart.
registerMaintenanceTask in interface MaintenanceRegistrytask - MaintenanceTask object with maintenance information that needs
to be stored to maintenance registry.MaintenanceTask with the same ID
or null if no tasks were registered for this ID.IgniteCheckedException - If handling or storing maintenance task failed.public void stop(boolean cancel)
throws IgniteCheckedException
stop in interface GridComponentstop in class GridProcessorAdaptercancel - If true, then all ongoing tasks or jobs for relevant
components need to be cancelled.IgniteCheckedException - Thrown in case of any errors.public void start()
throws IgniteCheckedException
start in interface GridComponentstart in class GridProcessorAdapterIgniteCheckedException - Throws in case of any errors.public void prepareAndExecuteMaintenance()
Maintenance tasks for these components are removed
and their maintenance actions are not executed.prepareAndExecuteMaintenance in interface MaintenanceRegistry@Nullable public @Nullable MaintenanceTask activeMaintenanceTask(String maitenanceTaskName)
MaintenanceTask by its name.
There are active tasks only when node entered Maintenance Mode.
MaintenanceTask becomes active when node enters Maintenance Mode and doesn't resolve the task
during maintenance prepare phase.activeMaintenanceTask in interface MaintenanceRegistrymaitenanceTaskName - Maintenance Task name.MaintenanceTask object for given name or null if no maintenance task was found.public boolean isMaintenanceMode()
isMaintenanceMode in interface MaintenanceRegistryTrue if any maintenance task was found.public boolean unregisterMaintenanceTask(String maintenanceTaskName)
MaintenanceTask of given ID from maintenance registry.unregisterMaintenanceTask in interface MaintenanceRegistrymaintenanceTaskName - name of MaintenanceTask to be deleted.true if existing task has been deleted.public void registerWorkflowCallback(@NotNull
@NotNull String maintenanceTaskName,
@NotNull
@NotNull MaintenanceWorkflowCallback cb)
MaintenanceWorkflowCallback for a MaintenanceTask with a given name.
Component registered MaintenanceTask automatically or by user request
is responsible for providing MaintenanceRegistry with an implementation of
MaintenanceWorkflowCallback where registry obtains MaintenanceActions
to be executed for this task and does a preliminary check before starting maintenance.registerWorkflowCallback in interface MaintenanceRegistrymaintenanceTaskName - name of MaintenanceTask this callback is registered for.cb - MaintenanceWorkflowCallback interface used by MaintenanceRegistry to execute
maintenance steps by workflow.public List<MaintenanceAction<?>> actionsForMaintenanceTask(String maintenanceTaskName)
MaintenanceActions provided by a component for MaintenanceTask with a given name.actionsForMaintenanceTask in interface MaintenanceRegistrymaintenanceTaskName - name of Maintenance Task.List of all available MaintenanceActions for given Maintenance Task.
Follow @ApacheIgnite
Ignite Database and Caching Platform : ver. 2.10.0 Release Date : March 10 2021