Client instances.
Client objects provide the means of creating Sessions that use an internally managed connection pool.
ClientFactory xClientFactory = new ClientFactory();Clientclient1 = xClientFactory.getClient("mysqlx://[user1[:pwd1]@]host1[:port1]/db", poolingProps);Clientclient2 = xClientFactory.getClient("mysqlx://host2[:port2]/db?user=user2&password=pwd2", poolingProps);
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public Client | Returns: aClient instancethe session URL. url, String JSON string representing a document that defines connection properties in a special format.
For pooling configuration, it should contain an embedded document after the "pooling" key:
clientPropsJson)
pooling : {
enabled: true|false,
maxSize: integer > 0,
maxIdleTime: integer ≥ 0,
queueTimeout: integer ≥ 0
}
Creates a |
| public Client | Returns: aClient instance.the session URL. url, Properties the clientProps)Properties instance that contains the connection properties. The keys in this Properties match with the path of each value
in the JSON document from getClient(String, String) (for example, pooling.enabled or pooling.maxSize).Creates a |
| ClientFactory | back to summary |
|---|---|
| public ClientFactory() | |
| getClient | back to summary |
|---|---|
| public Client getClient(String url, String clientPropsJson) Creates a
| |
| getClient | back to summary |
|---|---|
| public Client getClient(String url, Properties clientProps) Creates a
| |