xintongsong commented on a change in pull request #13864:
URL: https://github.com/apache/flink/pull/13864#discussion_r518531957



##########
File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/persistence/StateHandleStore.java
##########
@@ -0,0 +1,207 @@
+/*
+ * 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.flink.runtime.persistence;
+
+import org.apache.flink.api.java.tuple.Tuple2;
+import org.apache.flink.runtime.state.RetrievableStateHandle;
+import org.apache.flink.util.FlinkException;
+
+import java.io.IOException;
+import java.io.Serializable;
+import java.util.Collection;
+import java.util.List;
+
+/**
+ * Class which stores state via the provided {@link 
RetrievableStateStorageHelper} and writes the
+ * returned state handle to distributed coordination system(e.g. Zookeeper, 
Kubernetes, etc.).
+ *
+ * <p>To avoid concurrent modification issues, the implementation needs to 
ensure that only the leader could
+ * update the state store.
+ *
+ * <p>Even some methods name contains the "lock"(e.g. {@link #getAndLock}), it 
does not mean the implementation has to
+ * actually lock a specific state handle. Also it could have an empty 
implementation for release operation.
+ *
+ * @param <T> Type of state
+ * @param <R> Type of {@link ResourceVersion}
+ */
+public interface StateHandleStore<T extends Serializable, R extends 
ResourceVersion> {

Review comment:
       nit:
   ```
   R extends ResourceVersion<R>
   ```




----------------------------------------------------------------
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:
us...@infra.apache.org


Reply via email to