amaliujia commented on a change in pull request #213:
URL: https://github.com/apache/incubator-ratis/pull/213#discussion_r499124095



##########
File path: 
ratis-server/src/main/java/org/apache/ratis/server/DataStreamServerFactory.java
##########
@@ -36,4 +38,11 @@ static DataStreamServerFactory cast(DataStreamFactory 
dataStreamFactory) {
    * Server implementation for streaming in Raft group
    */
   DataStreamServerRpc newDataStreamServerRpc(RaftPeer server);
+
+  /**
+   * Server implementation for streaming in Raft group. The server will 
forward requests
+   * to peers.
+   */
+  DataStreamServerRpc newDataStreamServerRpc(
+      RaftPeer server, List<RaftPeer> peers, RaftProperties properties);

Review comment:
       I have added this new API that assume servers can have two modes:
   1. with peers parameter this server forwards message to peers (if the server 
is initialized by `ataStreamServerRpc newDataStreamServerRpc(RaftPeer server, 
List<RaftPeer> peers, RaftProperties properties);`
   2. without peers parameter this server does not forward messages (if the 
server is initialized by `DataStreamServerRpc newDataStreamServerRpc(RaftPeer 
server);`)




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


Reply via email to