Constructor
new ExecutionProfile(name, optionsopt)
Creates a new instance of ExecutionProfile.
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. Properties
|
- 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: