C# Class CqlSharp.Network.ExclusiveConnectionStrategy

This strategy will provide connections that are not shared between CqlConnection, or CqlCommand instances. This makes interference between sequences of queries not possible. This may be of importance when "use" queries are applied. Because of the exclusive use of connections, connections may not be used fully, and the chance that the application will run out of available connections is not unlikely under stress.
Inheritance: IConnectionStrategy
Mostra file Open project: reuzel/CqlSharp

Public Methods

Method Description
ExclusiveConnectionStrategy ( Ring nodes, CqlConnectionStringBuilder config ) : System

Initializes the strategy with the specified nodes and cluster configuration

GetOrCreateConnection ( ConnectionScope scope, PartitionKey partitionKey ) : Connection
ReturnConnection ( Connection connection, ConnectionScope scope ) : void

Method Details

ExclusiveConnectionStrategy() public method

Initializes the strategy with the specified nodes and cluster configuration
public ExclusiveConnectionStrategy ( Ring nodes, CqlConnectionStringBuilder config ) : System
nodes Ring The nodes.
config CqlConnectionStringBuilder The config.
return System

GetOrCreateConnection() public method

public GetOrCreateConnection ( ConnectionScope scope, PartitionKey partitionKey ) : Connection
scope ConnectionScope
partitionKey PartitionKey
return Connection

ReturnConnection() public method

public ReturnConnection ( Connection connection, ConnectionScope scope ) : void
connection Connection
scope ConnectionScope
return void