Class ConstantSpeculativeExecutionPolicy
A ISpeculativeExecutionPolicy that schedules a given number of speculative executions, separated by a fixed delay.
Inherited Members
Namespace: Cassandra
Assembly: Cassandra.dll
Syntax
public class ConstantSpeculativeExecutionPolicy : ISpeculativeExecutionPolicy, IDisposable
Constructors
ConstantSpeculativeExecutionPolicy(long, int)
Creates a new instance of a ISpeculativeExecutionPolicy that schedules a given number of speculative executions, separated by a fixed delay.
Declaration
public ConstantSpeculativeExecutionPolicy(long delay, int maxSpeculativeExecutions)
Parameters
| Type | Name | Description |
|---|---|---|
| long | delay | The constant delay in milliseconds between each speculative execution. Must be strictly positive. |
| int | maxSpeculativeExecutions | The number of speculative executions. Must be strictly positive. |
Properties
Delay
Declaration
public long Delay { get; }
Property Value
| Type | Description |
|---|---|
| long |
MaxSpeculativeExecutions
Declaration
public int MaxSpeculativeExecutions { get; }
Property Value
| Type | Description |
|---|---|
| int |
Methods
Dispose()
Declaration
public void Dispose()
Initialize(ICluster)
Initializes the policy at cluster startup.
Declaration
public void Initialize(ICluster cluster)
Parameters
| Type | Name | Description |
|---|---|---|
| ICluster | cluster |
NewPlan(string, IStatement)
Returns the plan to use for a new query.
Declaration
public ISpeculativeExecutionPlan NewPlan(string keyspace, IStatement statement)
Parameters
| Type | Name | Description |
|---|---|---|
| string | keyspace | the currently logged keyspace |
| IStatement | statement | the query for which to build a plan. |
Returns
| Type | Description |
|---|---|
| ISpeculativeExecutionPlan |