C# 클래스 Dse.Policies.DseLoadBalancingPolicy

A load balancing policy designed to run against DSE cluster.

For most executions, the query plan will be determined by the child load balancing policy. Except for some cases, like graph analytics queries, for which it uses the preferred analytics graph server previously obtained by driver as first host in the query plan.

상속: ILoadBalancingPolicy
파일 보기 프로젝트 열기: datastax/csharp-driver-dse 1 사용 예제들

공개 메소드들

메소드 설명
CreateDefault ( ) : DseLoadBalancingPolicy

Creates the default load balancing policy, using Cassandra.Policies.DefaultLoadBalancingPolicy as child policy.

Distance ( Cassandra.Host host ) : HostDistance

Returns the distance as determined by the child policy.

DseLoadBalancingPolicy ( ILoadBalancingPolicy childPolicy ) : System

Creates a new instance of DseLoadBalancingPolicy wrapping the provided child policy.

DseLoadBalancingPolicy ( string localDc, int usedHostsPerRemoteDc ) : System

Creates a new instance of DseLoadBalancingPolicy given the name of the local datacenter and the amount of host per remote datacenter to use for failover for the local hosts.

Initialize ( ICluster cluster ) : void

Initializes the policy.

NewQueryPlan ( string keyspace, IStatement statement ) : IEnumerable

Returns the hosts to used for a query.

비공개 메소드들

메소드 설명
YieldPreferred ( string keyspace, TargettedSimpleStatement statement ) : IEnumerable

메소드 상세

CreateDefault() 공개 정적인 메소드

Creates the default load balancing policy, using Cassandra.Policies.DefaultLoadBalancingPolicy as child policy.
public static CreateDefault ( ) : DseLoadBalancingPolicy
리턴 DseLoadBalancingPolicy

Distance() 공개 메소드

Returns the distance as determined by the child policy.
public Distance ( Cassandra.Host host ) : HostDistance
host Cassandra.Host
리턴 HostDistance

DseLoadBalancingPolicy() 공개 메소드

Creates a new instance of DseLoadBalancingPolicy wrapping the provided child policy.
public DseLoadBalancingPolicy ( ILoadBalancingPolicy childPolicy ) : System
childPolicy ILoadBalancingPolicy
리턴 System

DseLoadBalancingPolicy() 공개 메소드

Creates a new instance of DseLoadBalancingPolicy given the name of the local datacenter and the amount of host per remote datacenter to use for failover for the local hosts.
public DseLoadBalancingPolicy ( string localDc, int usedHostsPerRemoteDc ) : System
localDc string The name of the local datacenter (case-sensitive)
usedHostsPerRemoteDc int /// The amount of host per remote datacenter that the policy should yield in a new query plan after the local /// nodes. ///
리턴 System

Initialize() 공개 메소드

Initializes the policy.
public Initialize ( ICluster cluster ) : void
cluster ICluster
리턴 void

NewQueryPlan() 공개 메소드

Returns the hosts to used for a query.
public NewQueryPlan ( string keyspace, IStatement statement ) : IEnumerable
keyspace string
statement IStatement
리턴 IEnumerable