primaryConnection
public static XGConnectionInfo.Builder primaryConnection(String user,
String pwd,
String ip,
int portNum,
String hint_url,
String database,
String protocolVersion,
XGConnection.Tls tls,
CaselessProperties hint_properties)
Creates a new primary connection to a database server.
This method creates a new connection to the database server using the specified connection parameters. Primary connections should not bypass the load balancer, and connection property validation should be performed on the provided connection properties. Server version updates are also performed, since the primary connection should update the server version for the forked connections.
- Parameters:
user- the user name for the connectionpwd- the password for the connectionip- the IP address of the database serverportNum- the port number of the database serverhint_url- the JDBC URL for the connectiondatabase- the name of the database to connect toprotocolVersion- the version of the database protocol to usetls- the TLS configuration for the connectionhint_properties- additional connection properties to set, validated against the database- Returns:
- a new XGConnectionInfo object representing the new database connection