DCAwareRoundRobinPolicy MembersA C# client driver for Apache Cassandra

The DCAwareRoundRobinPolicy type exposes the following members.
Constructors

  NameDescription
Public methodDCAwareRoundRobinPolicy(String)
Creates a new datacenter aware round robin policy given the name of the local datacenter.

The name of the local datacenter provided must be the local datacenter name as known by Cassandra.

The policy created will ignore all remote hosts. In other words, this is equivalent to

new DCAwareRoundRobinPolicy(localDc, 0)
.

Public methodDCAwareRoundRobinPolicy(String, Int32)
Creates a new DCAwareRoundRobin policy given the name of the local datacenter and that uses the provided number of host per remote datacenter as failover for the local hosts.

The name of the local datacenter provided must be the local datacenter name as known by Cassandra.

Back to Top
Methods

  NameDescription
Public methodDistance
Return the HostDistance for the provided host.

This policy consider nodes in the local datacenter as

. For each remote datacenter, it considers a configurable number of hosts as and the rest is .

To configure how many host in each remote datacenter is considered

, see #DCAwareRoundRobinPolicy(String, int).

Public methodOnlineEquals
Determines whether the specified OnlineObject is equal to the current OnlineObject.
(Inherited from OnlineObject.)
Protected methodOnlineFinalize
Allows an OnlineObject to attempt to free resources and perform other cleanup operations before the OnlineObject is reclaimed by garbage collection.
(Inherited from OnlineObject.)
Public methodOnlineGetHashCode
Serves as a hash function for a particular type.
(Inherited from OnlineObject.)
Public methodOnlineGetType
Gets the OnlineType of the current instance.
(Inherited from OnlineObject.)
Public methodInitialize
Protected methodOnlineMemberwiseClone
Creates a shallow copy of the current OnlineObject.
(Inherited from OnlineObject.)
Public methodNewQueryPlan
Returns the hosts to use for a new query.

The returned plan will always try each known host in the local datacenter first, and then, if none of the local host is reacheable, will try up to a configurable number of other host per remote datacenter. The order of the local node in the returned query plan will follow a Round-robin algorithm.

Public methodOnlineToString
Returns a OnlineString that represents the current OnlineObject.
(Inherited from OnlineObject.)
Back to Top
See Also