Class Policies
Represents the policies configured for a ICluster instance.
Inherited Members
Namespace: Cassandra
Assembly: Cassandra.dll
Syntax
public class Policies
Constructors
Policies()
Declaration
public Policies()
Policies(ILoadBalancingPolicy, IReconnectionPolicy, IRetryPolicy)
Creates a new Policies
object using the provided policies.
Declaration
public Policies(ILoadBalancingPolicy loadBalancingPolicy, IReconnectionPolicy reconnectionPolicy, IRetryPolicy retryPolicy)
Parameters
Type | Name | Description |
---|---|---|
ILoad |
loadBalancingPolicy | the load balancing policy to use. |
IReconnection |
reconnectionPolicy | the reconnection policy to use. |
IRetry |
retryPolicy | the retry policy to use. |
Properties
ColumnEncryptionPolicy
Gets the column encryption policy in use. See IColumn
Declaration
public IColumnEncryptionPolicy ColumnEncryptionPolicy { get; }
Property Value
Type | Description |
---|---|
IColumn |
DefaultLoadBalancingPolicy
DEPRECATED: Use New
The default load balancing policy.
The default load balancing policy is Default
Declaration
public static ILoadBalancingPolicy DefaultLoadBalancingPolicy { get; }
Property Value
Type | Description |
---|---|
ILoad |
DefaultPolicies
Gets a new instance Policies containing default policies of the driver.
Declaration
public static Policies DefaultPolicies { get; }
Property Value
Type | Description |
---|---|
Policies |
DefaultReconnectionPolicy
The default reconnection policy.
The default reconnection policy is an
ExponentialReconnectionPolicy where the base delay is 1 second and the max delay is 10 minutes;Declaration
public static IReconnectionPolicy DefaultReconnectionPolicy { get; }
Property Value
Type | Description |
---|---|
IReconnection |
DefaultRetryPolicy
The default retry policy.The default retry policy is Default
Declaration
public static IRetryPolicy DefaultRetryPolicy { get; }
Property Value
Type | Description |
---|---|
IRetry |
DefaultSpeculativeExecutionPolicy
The ISpeculative
The default is No
Declaration
public static ISpeculativeExecutionPolicy DefaultSpeculativeExecutionPolicy { get; }
Property Value
Type | Description |
---|---|
ISpeculative |
DefaultTimestampGenerator
Gets a new instance of the default ITimestamp
The default ITimestamp
Declaration
public static ITimestampGenerator DefaultTimestampGenerator { get; }
Property Value
Type | Description |
---|---|
ITimestamp |
LoadBalancingPolicy
Gets the load balancing policy in use.
The load balancing policy defines how Cassandra hosts are picked for queries.
Declaration
public ILoadBalancingPolicy LoadBalancingPolicy { get; }
Property Value
Type | Description |
---|---|
ILoad |
ReconnectionPolicy
Gets the reconnection policy in use.
The reconnection policy defines how often the driver tries to reconnect to a dead node.
Declaration
public IReconnectionPolicy ReconnectionPolicy { get; }
Property Value
Type | Description |
---|---|
IReconnection |
RetryPolicy
Gets the retry policy in use.
The retry policy defines in which conditions a query should be automatically retries by the driver.
Declaration
public IRetryPolicy RetryPolicy { get; }
Property Value
Type | Description |
---|---|
IRetry |
SpeculativeExecutionPolicy
Gets the Speculative
Declaration
public ISpeculativeExecutionPolicy SpeculativeExecutionPolicy { get; }
Property Value
Type | Description |
---|---|
ISpeculative |
TimestampGenerator
Gets the ITimestamp
Declaration
public ITimestampGenerator TimestampGenerator { get; }
Property Value
Type | Description |
---|---|
ITimestamp |
Methods
NewDefaultLoadBalancingPolicy(string)
Creates a new instance of the default load balancing policy with the provided local datacenter. This is equivalent to:
new DefaultLoadBalancingPolicy(new TokenAwarePolicy(new DCAwareRoundRobinPolicy(localDc)))
Declaration
public static ILoadBalancingPolicy NewDefaultLoadBalancingPolicy(string localDc)
Parameters
Type | Name | Description |
---|---|---|
string | localDc |
Returns
Type | Description |
---|---|
ILoad |