Click or drag to resize
RoundRobinPolicy Class
A Round-robin load balancing policy.

This policy queries nodes in a round-robin fashion. For a given query, if an host fail, the next one (following the round-robin order) is tried, until all hosts have been tried.

This policy is not datacenter aware and will include every known Cassandra host in its round robin algorithm. If you use multiple datacenter this will be inefficient and you will want to use the DCAwareRoundRobinPolicy load balancing policy instead.

Inheritance Hierarchy
SystemObject
  DseRoundRobinPolicy

Namespace: Dse
Assembly: Dse (in Dse.dll) Version: 2.1.0
Syntax
C#
public class RoundRobinPolicy : ILoadBalancingPolicy

The RoundRobinPolicy type exposes the following members.

Constructors
  NameDescription
Public methodRoundRobinPolicy
Initializes a new instance of the RoundRobinPolicy class
Top
Methods
  NameDescription
Public methodDistance
Return the HostDistance for the provided host.

This policy consider all nodes as local. This is generally the right thing to do in a single datacenter deployment. If you use multiple datacenter, see DCAwareRoundRobinPolicy instead.

Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodInitialize
Public methodNewQueryPlan
Returns the hosts to use for a new query.

The returned plan will try each known host of the cluster. Upon each call to this method, the ith host of the plans returned will cycle over all the host of the cluster in a round-robin fashion.

Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
See Also

Reference