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.
Global
This class is global
Members
The graph options for this profile.
Properties:
Name
Type
Description
language
String
The graph language.
name
String
The graph name.
readConsistency
String
The consistency to use for graph write queries.
source
String
The graph traversal source.
writeConsistency
String
The consistency to use for graph write queries.
LoadBalancingPolicy
loadBalancing
Name of the execution profile.
Serial consistency level.
Constructor
Creates a new instance of ExecutionProfile .
Examples:
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 );
Parameters:
Name
Type
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 optional
Object
Profile options, when any of the options is not specified the Client will the use
the ones defined in the default profile.
options.consistency optional
Number
The consistency level to use for this profile.
options.loadBalancing optional
LoadBalancingPolicy
The load-balancing policy to use for this profile.
options.readTimeout optional
Number
The client per-host request timeout to use for this profile.
options.retry optional
RetryPolicy
The retry policy to use for this profile.
options.serialConsistency optional
Number
The serial consistency level to use for this profile.
options.graphOptions optional
Object
options.graphOptions.language optional
String
The graph language to use for graph queries.
Note that this setting should normally be undefined or set by a utility method and it’s not expected
to be defined manually by the user.
options.graphOptions.results optional
String
The protocol to use for serializing and deserializing graph results.
Note that this setting should normally be undefined or set by a utility method and it’s not expected
to be defined manually by the user.
options.graphOptions.name optional
String
The graph name to use for graph queries.
options.graphOptions.readConsistency optional
Number
The consistency level to use for graph read queries.
options.graphOptions.source optional
String
The graph traversal source name to use for graph queries.
options.graphOptions.writeConsistency optional
Number
The consistency level to use for graph write queries.
options.loadBalancing optional
LoadBalancingPolicy
The load-balancing policy to use for this profile.
options.readTimeout optional
Number
The client per-host request timeout to use for this profile.
options.retry optional
RetryPolicy
The retry policy to use for this profile.
options.serialConsistency optional
Number
The serial consistency level to use for this profile.