Class DefragmentationWorkflowCallback
- java.lang.Object
-
- org.apache.ignite.internal.processors.cache.persistence.defragmentation.maintenance.DefragmentationWorkflowCallback
-
- All Implemented Interfaces:
MaintenanceWorkflowCallback
public class DefragmentationWorkflowCallback extends Object implements MaintenanceWorkflowCallback
Defragmentation specific callback for maintenance mode.
-
-
Constructor Summary
Constructors Constructor Description DefragmentationWorkflowCallback(Function<Class<?>,IgniteLogger> logProvider, CachePartitionDefragmentationManager defrgMgr, FailureProcessor failureProc)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description @NotNull List<MaintenanceAction<?>>allActions()Supplies list ofMaintenanceActions that user can call to fix maintenance situation for the component or get information about ongoing actions.@Nullable MaintenanceAction<Boolean>automaticAction()Component can provide optionalMaintenanceActionthat will be executed automatically byMaintenanceRegistrywhen node enters maintenance mode.booleanshouldProceedWithMaintenance()Called byMaintenanceRegistryand enables it to check if maintenance is still needed for component that provided this callback.
-
-
-
Constructor Detail
-
DefragmentationWorkflowCallback
public DefragmentationWorkflowCallback(Function<Class<?>,IgniteLogger> logProvider, CachePartitionDefragmentationManager defrgMgr, FailureProcessor failureProc)
- Parameters:
logProvider- Logger provider.defrgMgr- Defragmentation manager.failureProc- Failure processor.
-
-
Method Detail
-
shouldProceedWithMaintenance
public boolean shouldProceedWithMaintenance()
Called byMaintenanceRegistryand enables it to check if maintenance is still needed for component that provided this callback. User may fix maintenance situation by hand when node was down thus before going to maintenance mode we should be able to check if it is still necessary.- Specified by:
shouldProceedWithMaintenancein interfaceMaintenanceWorkflowCallback- Returns:
Trueif maintenance is still needed for the component.
-
allActions
@NotNull public @NotNull List<MaintenanceAction<?>> allActions()
Supplies list ofMaintenanceActions that user can call to fix maintenance situation for the component or get information about ongoing actions. Should not be null or empty.- Specified by:
allActionsin interfaceMaintenanceWorkflowCallback- Returns:
- Not null and non-empty
ListofMaintenanceAction.
-
automaticAction
@Nullable public @Nullable MaintenanceAction<Boolean> automaticAction()
Component can provide optionalMaintenanceActionthat will be executed automatically byMaintenanceRegistrywhen node enters maintenance mode. If no automatic actions are providedMaintenanceRegistrywill wait for user to triggerMaintenanceActionwith logic to fix the maintenance situation.- Specified by:
automaticActionin interfaceMaintenanceWorkflowCallback- Returns:
MaintenanceActionfor automatic execution or null if maintenance situation should not be fixed automatically.
-
-