C# Класс CqlSharp.Network.RandomConnectionStrategy

Connection selection strategy that randomizes the connections over the nodes in the cluster
Наследование: IConnectionStrategy
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
GetOrCreateConnection ( ConnectionScope scope, PartitionKey partitionKey ) : Connection

Gets or creates connection to the cluster.

RandomConnectionStrategy ( Ring nodes, CqlConnectionStringBuilder config ) : System

Initializes the strategies with the specified nodes and cluster configuration

ReturnConnection ( Connection connection, ConnectionScope scope ) : void

Invoked when a connection is no longer in use by the application

Описание методов

GetOrCreateConnection() публичный Метод

Gets or creates connection to the cluster.
public GetOrCreateConnection ( ConnectionScope scope, PartitionKey partitionKey ) : Connection
scope ConnectionScope The scope.
partitionKey PartitionKey The partition key.
Результат Connection

RandomConnectionStrategy() публичный Метод

Initializes the strategies with the specified nodes and cluster configuration
public RandomConnectionStrategy ( Ring nodes, CqlConnectionStringBuilder config ) : System
nodes Ring The nodes.
config CqlConnectionStringBuilder The config.
Результат System

ReturnConnection() публичный Метод

Invoked when a connection is no longer in use by the application
public ReturnConnection ( Connection connection, ConnectionScope scope ) : void
connection Connection The connection no longer used.
scope ConnectionScope The scope.
Результат void