static Port getPortToConnectTo(ReplicaId replicaId, boolean routerEnableHttp2NetworkClient) {
    if (routerEnableHttp2NetworkClient) {
      return new Port(replicaId.getDataNodeId().getHttp2Port(), PortType.HTTP2);
    } else {
      return replicaId.getDataNodeId().getPortToConnectTo();
    }
  }
A temporary method to get port before http2 based replication is implemented.
TODO: remove this once http2 based replication is implemented.
@param replicaId The {@link ReplicaId} to connect to.
@param routerEnableHttp2NetworkClient  if http2 network client should be enabled.
@return the port to connect.
ambry-router/src/main/java/com/github/ambry/router/RouterUtils.java