Click or drag to resize

PoolingOptions Methods

The PoolingOptions type exposes the following members.

Methods
  NameDescription
Public methodStatic memberCreate
Creates a new instance of PoolingOptions using the default amount of connections and settings based on the protocol version.

For modern server versions (Apache Cassandra 2.1+) the amount of core connections are set to 1, setting 2 for max local connections.

Public methodGetCoreConnectionsPerHost

The core number of connections per host.

For the provided HostDistance, this correspond to the number of connections initially created and kept open to each host of that distance.

Public methodGetHeartBeatInterval
Gets the amount of idle time in milliseconds that has to pass before the driver issues a request on an active connection to avoid idle time disconnections.
Remarks
A value of 0 or null means that the heartbeat functionality at connection level is disabled.
Public methodGetMaxConnectionPerHost
The maximum number of connections per host.

For the provided distance, this correspond to the maximum number of connections that can be created per host at that distance.

Public methodGetMaxRequestsPerConnection
Gets the maximum amount of requests that can be in-flight on a single connection at the same time.

This setting acts as a fixed maximum, once this value is reached for a host the pool will start rejecting requests, throwing BusyPoolException instances.

This setting should not be mistaken with GetMaxSimultaneousRequestsPerConnectionTreshold(HostDistance).

Public methodGetMaxSimultaneousRequestsPerConnectionTreshold

Number of simultaneous requests on each connections to a host after which more connections are created.

If all the connections opened to a host are handling more than this number of simultaneous requests and there is less than GetMaxConnectionPerHost(HostDistance) connections open to this host, a new connection is open.

Public methodGetMinSimultaneousRequestsPerConnectionTreshold
Number of simultaneous requests on a connection below which connections in excess are reclaimed.

If an opened connection to an host at distance distance handles less than this number of simultaneous requests and there is more than #GetCoreConnectionsPerHost connections open to this host, the connection is closed.

The default value for this option is 25 for Local and Remote hosts.

Public methodGetWarmup
Gets whether all connections to hosts in the local datacenter must be opened on connect. Default: true.
Public methodSetCoreConnectionsPerHost
Sets the core number of connections per host.
Public methodSetHeartBeatInterval
Sets the amount of idle time in milliseconds that has to pass before the driver issues a request on an active connection to avoid idle time disconnections.
Remarks
When set to 0 the heartbeat functionality at connection level is disabled.
Public methodSetMaxConnectionsPerHost
Sets the maximum number of connections per host.
Public methodSetMaxRequestsPerConnection
Sets the maximum amount of requests that can be in-flight on a single connection at the same time.

This setting acts as a fixed maximum, once this value is reached for a host the pool will start rejecting requests, throwing BusyPoolException instances.

This setting should not be mistaken with SetMaxSimultaneousRequestsPerConnectionTreshold(HostDistance, Int32).

Public methodSetMaxSimultaneousRequestsPerConnectionTreshold
Sets number of simultaneous requests on all connections to an host after which more connections are created.
Public methodSetMinSimultaneousRequestsPerConnectionTreshold
Sets the number of simultaneous requests on a connection below which connections in excess are reclaimed.
Public methodSetWarmup
Sets whether all connections to hosts in the local datacenter must be opened on connect. Default: true.
Top
See Also