Class: SpeculativeExecutionPolicy

(abstract) policies/speculativeExecution~SpeculativeExecutionPolicy()

The policy that decides if the driver will send speculative queries to the next hosts when the current host takes too long to respond.

Note that only idempotent statements will be speculatively retried.

Constructor

(abstract) new SpeculativeExecutionPolicy()

Source:

Methods

getOptions()

Gets an associative array containing the policy options.

Source:

(abstract) init(client)

Initialization method that gets invoked on Client startup.

Parameters:
Name Type Description
client Client
Source:

(abstract) newPlan(keyspace, queryInfo) → {Object}

Gets the plan to use for a new query. Returns an object with a nextExecution() method, which returns a positive number representing the amount of milliseconds to delay the next execution or a non-negative number to avoid further executions.

Parameters:
Name Type Description
keyspace String

The currently logged keyspace.

queryInfo String | Array.<String>

The query, or queries in the case of batches, for which to build a plan.

Source:
Returns:
Type
Object

(abstract) shutdown()

Gets invoked at client shutdown, giving the opportunity to the implementor to perform cleanup.

Source: