MCPcopy Create free account
hub / github.com/apache/cassandra-nodejs-driver / newInstance

Function newInstance

test/unit/request-handler-tests.js:483–491  ·  view source on GitHub ↗

* @param {Request} request * @param {Client} client * @param {LoadBalancingPolicy} lbp * @param {RetryPolicy} [retry] * @param {Boolean} [isIdempotent] * @param {Host} [host] * @returns {RequestHandler}

(request, client, lbp, retry, isIdempotent, host)

Source from the content-addressed store, hash-verified

481 * @returns {RequestHandler}
482 */
483function newInstance(request, client, lbp, retry, isIdempotent, host) {
484 client = client || newClient(null, lbp);
485 const options = {
486 executionProfile: new ExecutionProfile('abc', { loadBalancing: lbp }), retry: retry, isIdempotent: isIdempotent, host: host
487 };
488 const execOptions = new DefaultExecutionOptions(options, client);
489
490 return new RequestHandler(request, execOptions, client);
491}
492
493function newClient(metadata, lbp) {
494 const options = defaultOptions();

Callers 1

Calls 1

newClientFunction · 0.85

Tested by

no test coverage detected