XComp commented on code in PR #22601:
URL: https://github.com/apache/flink/pull/22601#discussion_r1229512559


##########
flink-runtime/src/main/java/org/apache/flink/runtime/leaderelection/AbstractLeaderElectionService.java:
##########
@@ -27,29 +27,37 @@
 public abstract class AbstractLeaderElectionService implements 
LeaderElectionService {
 
     @Override
-    public LeaderElection createLeaderElection() {
-        return new DefaultLeaderElection(this);
+    public LeaderElection createLeaderElection(String contenderID) {
+        return new DefaultLeaderElection(this, contenderID);
     }
 
     /**
-     * Registers the given {@link LeaderContender} with the underlying {@code
-     * LeaderElectionService}. Leadership changes are starting to be reported 
to the {@code
-     * LeaderContender}.
+     * Registers the given {@link LeaderContender} under the passed {@code 
contenderID} with the
+     * underlying {@code LeaderElectionService}. Leadership changes are 
starting to be reported to
+     * the {@code LeaderContender}.
      */
-    protected abstract void register(LeaderContender contender) throws 
Exception;
+    protected abstract void register(String contenderID, LeaderContender 
contender)
+            throws Exception;
 
-    /** Removes the passed {@code LeaderContender} from the {@code 
LeaderElectionService}. */
-    protected abstract void remove(LeaderContender contender);
+    /**
+     * Removes the {@code LeaderContender} from the {@code 
LeaderElectionService} that is associated
+     * with the passed {@code contenderID}.

Review Comment:
   Maybe, it's my English here but I thought that I could use both terms 
interchangably. Anyway, I revisited the JavaDoc and removed both forms and 
rather referred to the parameter by their names explicitly.



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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to