Was this page helpful?
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)
Parameters:
| Name | Type | Attributes | Description | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
name |
String | Name of the execution profile.
Use |
|||||||||||||||||||||||||
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. See ClientOptions for more details. Properties
|
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
loadBalancing :LoadBalancingPolicy
Load-balancing policy
Type:
- LoadBalancingPolicy
name :String
Name of the execution profile.
Type:
- String
readTimeout :Number
Client read timeout.
Type:
- Number
retry :RetryPolicy
Retry policy.
Type:
- RetryPolicy
serialConsistency :Number
Serial consistency level.
Type:
- Number