Class: ExecutionProfile

ExecutionProfile(name, optionsopt)

Represents a set configurations to be used in a statement execution to be used for a single Client instance.

An ExecutionProfile instance should not be shared across different Client instances.

Constructor

new ExecutionProfile(name, optionsopt)

Creates a new instance of ExecutionProfile.

Parameters:
Name Type Attributes Description
name String

Name of the execution profile.

Use 'default' to specify that the new instance should be the default ExecutionProfile if no profile is specified in the execution.

options Object <optional>

Profile options, when any of the options is not specified the Client will the use the ones defined in the default profile.

Properties
Name Type Attributes Description
consistency Number <optional>

The consistency level to use for this profile.

loadBalancing LoadBalancingPolicy <optional>

The load-balancing policy to use for this profile.

readTimeout Number <optional>

The client per-host request timeout to use for this profile.

retry RetryPolicy <optional>

The retry policy to use for this profile.

serialConsistency Number <optional>

The serial consistency level to use for this profile.

loadBalancing LoadBalancingPolicy <optional>

The load-balancing policy to use for this profile.

readTimeout Number <optional>

The client per-host request timeout to use for this profile.

retry RetryPolicy <optional>

The retry policy to use for this profile.

serialConsistency Number <optional>

The serial consistency level to use for this profile.

Source:
Example
const { Client, ExecutionProfile } = require('cassandra-driver');
const client = new Client({
  contactPoints: ['host1', 'host2'],
  profiles: [
    new ExecutionProfile('metrics-oltp', {
      consistency: consistency.localQuorum,
      retry: myRetryPolicy
    })
  ]
});

client.execute(query, params, { executionProfile: 'metrics-oltp' }, callback);

Members

consistency :Number

Consistency level.

Type:
  • Number
Source:

graphOptions :undefined

Legacy field

Type:
  • undefined
Source:

loadBalancing :LoadBalancingPolicy

Load-balancing policy

Type:
  • LoadBalancingPolicy
Source:

name :String

Name of the execution profile.

Type:
  • String
Source:

readTimeout :Number

Client read timeout.

Type:
  • Number
Source:

retry :RetryPolicy

Retry policy.

Type:
  • RetryPolicy
Source:

serialConsistency :Number

Serial consistency level.

Type:
  • Number
Source: