sanpwc commented on a change in pull request #147: URL: https://github.com/apache/ignite-3/pull/147#discussion_r639471515
########## File path: modules/raft-client/src/main/java/org/apache/ignite/raft/client/service/RaftGroupListener.java ########## @@ -0,0 +1,68 @@ +/* + * 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.raft.client.service; + +import java.util.Iterator; +import java.util.function.Consumer; +import org.apache.ignite.raft.client.ReadCommand; +import org.apache.ignite.raft.client.WriteCommand; + +/** + * A listener for replication group events. + */ +public interface RaftGroupListener { + /** + * The callback to apply read commands. + * <p> + * If the runtime exception is thrown during iteration all unprocessed read requests will be aborted with the STM Review comment: I believe that is relates only to unhandled runtime exceptions, cause nothing is wrong in further processing reads and writes in case of business logic runtime exceptions that were properly handled and propagated to client side with the help of clo.result(). For example, as was mentioned above CompactionException on metaStorage.get() shouldn't prevent further processing but should be propagated to client service. -- 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]
