You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ratis.apache.org by GitBox <gi...@apache.org> on 2022/02/21 13:15:14 UTC

[GitHub] [ratis] szetszwo commented on pull request #598: RATIS-1301. Support listener in RaftConfiguration

szetszwo commented on pull request #598:
URL: https://github.com/apache/ratis/pull/598#issuecomment-1046867967


   @codings-dan , the next task could be removing the old APIs below and replacing them with the new API.
   ```
   +++ b/ratis-server/src/main/java/org/apache/ratis/server/impl/PeerConfiguration.java
   @@ -63,10 +63,6 @@ class PeerConfiguration {
        return Collections.unmodifiableMap(map);
      }
    
   -  PeerConfiguration(Iterable<RaftPeer> peers) {
   -    this(peers, Collections.emptyList());
   -  }
   -
      PeerConfiguration(Iterable<RaftPeer> peers, Iterable<RaftPeer> listeners) {
        this.peers = newMap(peers, "peers", Collections.emptyMap());
        this.listeners = newMap(listeners, "listeners", this.peers);
   diff --git a/ratis-server/src/main/java/org/apache/ratis/server/impl/RaftConfigurationImpl.java b/ratis-server/src/main/java/org/apache/ratis/server/impl/RaftConfigurationImpl.java
   index 4bab3650..b46a2fbd 100644
   --- a/ratis-server/src/main/java/org/apache/ratis/server/impl/RaftConfigurationImpl.java
   +++ b/ratis-server/src/main/java/org/apache/ratis/server/impl/RaftConfigurationImpl.java
   @@ -63,10 +63,6 @@ final class RaftConfigurationImpl implements RaftConfiguration {
          return this;
        }
    
   -    Builder setConf(Iterable<RaftPeer> peers) {
   -      return setConf(new PeerConfiguration(peers));
   -    }
   -
        Builder setConf(Iterable<RaftPeer> peers, Iterable<RaftPeer> listeners) {
          return setConf(new PeerConfiguration(peers, listeners));
        }
   ```
   


-- 
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: issues-unsubscribe@ratis.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org