zhijiangW commented on a change in pull request #11507: [FLINK-16587] Add basic 
CheckpointBarrierHandler for unaligned checkpoint
URL: https://github.com/apache/flink/pull/11507#discussion_r400637920
 
 

 ##########
 File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/io/network/partition/PriorityEventListener.java
 ##########
 @@ -0,0 +1,54 @@
+/*
+ * 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.io.network.partition;
+
+import org.apache.flink.runtime.event.AbstractEvent;
+import org.apache.flink.runtime.io.network.buffer.BufferConsumer;
+
+import java.io.IOException;
+
+/**
+ * Listens to priority events (e.g., checkpoint barriers) of subpartitions. 
The listener can completely process the
+ * event without the buffer queue or let the subpartition enqueue the event in 
the front or back of the buffer queue.
+ */
+public interface PriorityEventListener {
+       /**
+        * Allows the listener to react to a priority event independent of the 
outgoing buffer queue.
+        *
+        * @return the action to be performed by the caller.
+        */
+       EnqueueAction priorityEvent(AbstractEvent event, BufferConsumer 
eventBufferConsumer) throws IOException;
 
 Review comment:
   I guess this return value actually not be used in practice now. Do we need 
to introduce it?

----------------------------------------------------------------
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


With regards,
Apache Git Services

Reply via email to