AsyncClient Constructor

Overload List

AsyncClient(AsyncClientPolicy, Host) Initialize asynchronous client with suitable hosts to seed the cluster map. The client policy is used to set defaults and size internal data structures. For each host connection that succeeds, the client will:
  • Add host to the cluster map
  • Request host's list of other nodes in cluster
  • Add these nodes to cluster map

In most cases, only one host is necessary to seed the cluster. The remaining hosts are added as future seeds in case of a complete network failure.

If one connection succeeds, the client is ready to process database requests. If all connections fail and the policy's failIfNotConnected is true, a connection exception will be thrown. Otherwise, the cluster will remain in a disconnected state until the server is activated.

AsyncClient(String, Int32) Initialize asynchronous client. If the host connection succeeds, the client will:
  • Add host to the cluster map
  • Request host's list of other nodes in cluster
  • Add these nodes to cluster map

If the connection succeeds, the client is ready to process database requests. If the connection fails, the cluster will remain in a disconnected state until the server is activated.

AsyncClient(AsyncClientPolicy, String, Int32) Initialize asynchronous client. The client policy is used to set defaults and size internal data structures. If the host connection succeeds, the client will:
  • Add host to the cluster map
  • Request host's list of other nodes in cluster
  • Add these nodes to cluster map

If the connection succeeds, the client is ready to process database requests. If the connection fails and the policy's failOnInvalidHosts is true, a connection exception will be thrown. Otherwise, the cluster will remain in a disconnected state until the server is activated.

See Also