contactPoints |
Array.<string>
|
Array of addresses or host names of the nodes to add as contact points.
Contact points are addresses of Cassandra nodes that the driver uses to discover the cluster topology.
Only one contact point is required (the driver will retrieve the address of the other nodes automatically),
but it is usually a good idea to provide more than one contact point, because if that single contact point is unavailable, the driver will not be able to initialize correctly.
|
policies |
Object
|
Properties
Name |
Type |
Description |
loadBalancing |
LoadBalancingPolicy
|
The load balancing policy instance to be used to determine the coordinator per query. |
retry |
RetryPolicy
|
The retry policy. |
reconnection |
ReconnectionPolicy
|
The reconnection policy to be used. |
addressResolution |
AddressTranslator
|
The address resolution policy. |
|
queryOptions |
QueryOptions
|
Default options for all queries. |
pooling |
Object
|
Pooling options.
Properties
Name |
Type |
Description |
heartBeatInterval |
Number
|
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. Default: 30000. |
coreConnectionsPerHost |
Object
|
Associative array containing amount of connections per host distance. |
|
protocolOptions |
Object
|
Properties
Name |
Type |
Description |
port |
Number
|
The port to use to connect to the Cassandra host. If not set through this method, the default port (9042) will be used instead. |
maxSchemaAgreementWaitSeconds |
Number
|
The maximum time in seconds to wait for schema agreement between nodes before returning from a DDL query. Default: 10. |
maxVersion |
Number
|
When set, it limits the maximum protocol version used to connect to the nodes.
Useful for using the driver against a cluster that contains nodes with different major/minor versions of Cassandra. |
|
socketOptions |
Object
|
Properties
Name |
Type |
Description |
connectTimeout |
Number
|
Connection timeout in milliseconds. Default: 5000. |
keepAlive |
Boolean
|
Whether to enable TCP keep-alive on the socket. Default: true. |
keepAliveDelay |
Number
|
TCP keep-alive delay in milliseconds. Default: 0. |
tcpNoDelay |
Boolean
|
When set to true, it disables the Nagle algorithm. Default: true. |
|
authProvider |
AuthProvider
|
Provider to be used to authenticate to an auth-enabled cluster. |
sslOptions |
Object
|
Client-to-node ssl options, when set the driver will use the secure layer.
You can specify cert, ca, ... options named after the Node.js tls.connect options. |
encoding |
Object
|
Properties
Name |
Type |
Description |
map |
function
|
Map constructor to use for Cassandra map type encoding and decoding.
If not set, it will default to Javascript Object with map keys as property names. |
set |
function
|
Set constructor to use for Cassandra set type encoding and decoding.
If not set, it will default to Javascript Array. |
copyBuffer |
Boolean
|
Determines if the network buffer should be copied for buffer based data types (blob, uuid, timeuuid and inet).
Setting it to true will cause that the network buffer is copied for each row value of those types,
causing additional allocations but freeing the network buffer to be reused.
Setting it to true is a good choice for cases where the Row and ResultSet returned by the queries are long-lived objects.
Setting it to false will cause less overhead and the reference of the network buffer to be maintained until the row / result set are de-referenced.
Default: true.
|
|