sergey-chugunov-1985 commented on a change in pull request #8325: URL: https://github.com/apache/ignite/pull/8325#discussion_r502401420
########## File path: modules/core/src/main/java/org/apache/ignite/maintenance/MaintenanceWorkflowCallback.java ########## @@ -0,0 +1,69 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.ignite.maintenance; + +import java.util.List; +import java.util.UUID; + +import org.apache.ignite.lang.IgniteExperimental; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; + +/** + * Abstraction to decouple interaction between {@link MaintenanceRegistry} + * and components that may require maintenance. + * + * If a component may cause node to enter maintenance mode, it should register this callback + * in {@link MaintenanceRegistry} using method {@link MaintenanceRegistry#registerWorkflowCallback(UUID, MaintenanceWorkflowCallback)} + * + * {@link MaintenanceRegistry} during its workflow will collect necessary information about maintenance for components + * without knowing implementation details of the components. + */ +@IgniteExperimental +public interface MaintenanceWorkflowCallback { + /** + * Called by {@link MaintenanceRegistry} and 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. + * + * @return {@code True} if maintenance is still needed for the component. + */ + public boolean proceedWithMaintenance(); Review comment: agree, renamed as you suggested ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected]
