Click or drag to resize

BuilderWithExecutionProfiles Method

Adds Execution Profiles to the Cluster instance.

Execution profiles are like configuration presets, multiple methods of the driver accept an execution profile name which is like telling the driver which settings to use for that particular request. This makes it easier to change settings like ConsistencyLevel and ReadTimeoutMillis on a per request basis.

Note that subsequent calls to this method will override the previously provided profiles.

To add execution profiles you can use WithProfile(String, ActionIExecutionProfileBuilder):

Cluster.Builder()
        .WithExecutionProfiles(options => options
            .WithProfile("profile1", profileBuilder => profileBuilder
                .WithReadTimeoutMillis(10000)
                .WithConsistencyLevel(ConsistencyLevel.LocalQuorum)))
        .Build()

Namespace:  Cassandra
Assembly:  Cassandra (in Cassandra.dll) Version: 3.11.0
Syntax
C#
public Builder WithExecutionProfiles(
	Action<IExecutionProfileOptions> profileOptionsBuilder
)

Parameters

profileOptionsBuilder
Type: SystemActionIExecutionProfileOptions

Return Value

Type: Builder
This builder
See Also