codings-dan commented on a change in pull request #594:
URL: https://github.com/apache/ratis/pull/594#discussion_r799393194



##########
File path: ratis-client/src/main/java/org/apache/ratis/client/RaftClient.java
##########
@@ -64,6 +65,9 @@
   /** Get the {@link SnapshotManagementApi} for the given server. */
   SnapshotManagementApi getSnapshotManagementApi(RaftPeerId server);
 
+  /** Get the {@link LeaderElectionManagementApi} for the given server. */
+  LeaderElectionManagementApi leaderElectionManagementApi(RaftPeerId server);

Review comment:
       done

##########
File path: 
ratis-server/src/main/java/org/apache/ratis/server/impl/RaftServerProxy.java
##########
@@ -546,9 +546,19 @@ public RaftClientReply 
snapshotManagement(SnapshotManagementRequest request) thr
         .thenCompose(impl -> impl.executeSubmitServerRequestAsync(() -> 
impl.takeSnapshotAsync(request)));
   }
 
-  public CompletableFuture<RaftClientReply> 
setLeaderElectionAsync(LeaderElectionRequest request) {
+  @Override
+  public RaftClientReply 
leaderElectionManagement(LeaderElectionManagementRequest request) throws 
IOException {
+    return RaftServerImpl.waitForReply(getId(), request, 
leaderElectionManagementAsync(request),
+        e -> RaftClientReply.newBuilder()
+            .setRequest(request)
+            .setException(e)
+            .build());
+  }
+
+  public CompletableFuture<RaftClientReply> leaderElectionManagementAsync(

Review comment:
       done




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