Interface IExecutionProfileBuilder
Builder that offers a fluent API to build execution profile instances.
Namespace: Cassandra
Assembly: Cassandra.dll
Syntax
public interface IExecutionProfileBuilder
Methods
WithConsistencyLevel(ConsistencyLevel)
Sets the
SerialConsistencyLevel
setting.
See ConsistencyDeclaration
IExecutionProfileBuilder WithConsistencyLevel(ConsistencyLevel consistencyLevel)
Parameters
Type | Name | Description |
---|---|---|
Consistency |
consistencyLevel |
Returns
Type | Description |
---|---|
IExecution |
This builder. |
WithGraphOptions(GraphOptions)
Sets the DSE Graph options.
See Graph
Declaration
IExecutionProfileBuilder WithGraphOptions(GraphOptions graphOptions)
Parameters
Type | Name | Description |
---|---|---|
Graph |
graphOptions |
Returns
Type | Description |
---|---|
IExecution |
WithLoadBalancingPolicy(ILoadBalancingPolicy)
Sets the load balancing policy.
See ILoad
Declaration
IExecutionProfileBuilder WithLoadBalancingPolicy(ILoadBalancingPolicy loadBalancingPolicy)
Parameters
Type | Name | Description |
---|---|---|
ILoad |
loadBalancingPolicy |
Returns
Type | Description |
---|---|
IExecution |
This builder. |
WithReadTimeoutMillis(int)
Sets the
ReadTimeoutMillis
setting which is the per-host read timeout in milliseconds.
When setting this value, keep in mind the following:
- the timeout settings used on the Cassandra side (*_request_timeout_in_ms in cassandra.yaml) should be taken into account when picking a value for this read timeout. In particular, if this read timeout option is lower than Cassandra's timeout, the driver might assume that the host is not responsive and mark it down.
- the read timeout is only approximate and only control the timeout to one Cassandra host, not the full query.
Setting a value of 0 disables client read timeouts.Declaration
IExecutionProfileBuilder WithReadTimeoutMillis(int readTimeoutMillis)
Parameters
Type | Name | Description |
---|---|---|
int | readTimeoutMillis |
Returns
Type | Description |
---|---|
IExecution |
This builder. |
WithRetryPolicy(IExtendedRetryPolicy)
Sets the retry policy.
See IRetry
Declaration
IExecutionProfileBuilder WithRetryPolicy(IExtendedRetryPolicy retryPolicy)
Parameters
Type | Name | Description |
---|---|---|
IExtended |
retryPolicy |
Returns
Type | Description |
---|---|
IExecution |
This builder. |
WithSerialConsistencyLevel(ConsistencyLevel)
Sets the
SerialConsistencyLevel
setting.
See ConsistencyDeclaration
IExecutionProfileBuilder WithSerialConsistencyLevel(ConsistencyLevel serialConsistencyLevel)
Parameters
Type | Name | Description |
---|---|---|
Consistency |
serialConsistencyLevel |
Returns
Type | Description |
---|---|
IExecution |
This builder. |
WithSpeculativeExecutionPolicy(ISpeculativeExecutionPolicy)
Sets the speculative execution policy.
See ISpeculative
Declaration
IExecutionProfileBuilder WithSpeculativeExecutionPolicy(ISpeculativeExecutionPolicy speculativeExecutionPolicy)
Parameters
Type | Name | Description |
---|---|---|
ISpeculative |
speculativeExecutionPolicy |
Returns
Type | Description |
---|---|
IExecution |
This builder. |