You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: lib/client.js
+20-6
Original file line number
Diff line number
Diff line change
@@ -14,10 +14,15 @@ var clientOptions = require('./client-options');
14
14
/**
15
15
* Client options
16
16
* @typedef {Object} ClientOptions
17
-
* @property {Array.<string>} contactPoints Array of addresses or host names of the nodes to add as contact points.
18
-
* Contact points are addresses of Cassandra nodes that the driver uses to discover the cluster topology.
19
-
* Only one contact point is required (the driver will retrieve the address of the other nodes automatically),
17
+
* @property {Array.<string>} contactPoints
18
+
* Array of addresses or host names of the nodes to add as contact points.
19
+
* <p>
20
+
* Contact points are addresses of Cassandra nodes that the driver uses to discover the cluster topology.
21
+
* </p>
22
+
* <p>
23
+
* Only one contact point is required (the driver will retrieve the address of the other nodes automatically),
20
24
* 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.
25
+
* </p>
21
26
* @property {Object} policies
22
27
* @property {LoadBalancingPolicy} policies.loadBalancing The load balancing policy instance to be used to determine the coordinator per query.
23
28
* @property {RetryPolicy} policies.retry The retry policy.
@@ -41,10 +46,19 @@ var clientOptions = require('./client-options');
41
46
* @property {Object} sslOptions Client-to-node ssl options, when set the driver will use the secure layer.
42
47
* You can specify cert, ca, ... options named after the Node.js tls.connect options.
43
48
* @property {Object} encoding
44
-
* @property {Function} encoding.map Map constructor to use for Cassandra map<k,v> types encoding and decoding.
49
+
* @property {Function} encoding.map Map constructor to use for Cassandra map<k,v> type encoding and decoding.
45
50
* If not set, it will default to Javascript Object with map keys as property names.
46
-
* @property {Function} encoding.set Set constructor to use for Cassandra set<k> types encoding and decoding.
47
-
* If not set, it will default to Javascript Array
51
+
* @property {Function} encoding.set Set constructor to use for Cassandra set<k> type encoding and decoding.
52
+
* If not set, it will default to Javascript Array.
53
+
* @property {Boolean} encoding.copyBuffer Determines if the network buffer should be copied.
54
+
* <p>
55
+
* Setting it to true will cause that the network buffer is copied for each row value, causing an additional allocations but freeing the network buffer to be reused.
56
+
* Setting it to true is a good choice for cases where the Row and ResultSet returned by the queries are long-lived objects.
57
+
* </p>
58
+
* <p>
59
+
* 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.
0 commit comments