@Override
  protected void prePeerModification(MasterProcedureEnv env) throws IOException {
    MasterCoprocessorHost cpHost = env.getMasterCoprocessorHost();
    if (cpHost != null) {
      cpHost.preUpdateReplicationPeerConfig(peerId, peerConfig);
    }
    ReplicationPeerDescription desc =
      env.getReplicationPeerManager().preUpdatePeerConfig(peerId, peerConfig);
    oldPeerConfig = desc.getPeerConfig();
    enabled = desc.isEnabled();
  }
The procedure for updating the config for a replication peer.
hbase-server/src/main/java/org/apache/hadoop/hbase/master/replication/UpdatePeerConfigProcedure.java