Module: policies

Contains driver tuning policies to determine load balancing, retrying queries, reconnecting to a node, address resolution, timestamp generation and speculative execution.

Source:

Methods

(static) defaultAddressTranslator() → {AddressTranslator}

Returns a new instance of the default address translator policy used by the driver.

Source:
Returns:
Type
AddressTranslator

(static) defaultLoadBalancingPolicy(localDcopt) → {DefaultLoadBalancingPolicy}

Returns a new instance of the default load-balancing policy used by the driver.

Parameters:
Name Type Attributes Description
localDc string <optional>

When provided, it sets the data center that is going to be used as local for the load-balancing policy instance, with dc failover disabled.

When localDc is undefined, the load balancing policy will not be data-center aware.

Source:
Returns:
Type
DefaultLoadBalancingPolicy

(static) defaultReconnectionPolicy() → {ReconnectionPolicy}

Returns a new instance of the default reconnection policy used by the driver.

Source:
Returns:
Type
ReconnectionPolicy

(static) defaultRetryPolicy() → {RetryPolicy}

Returns a new instance of the default retry policy used by the driver.

Source:
Returns:
Type
RetryPolicy

(static) defaultSpeculativeExecutionPolicy() → {SpeculativeExecutionPolicy}

Returns a new instance of the default speculative execution policy used by the driver.

Source:
Returns:
Type
SpeculativeExecutionPolicy

(static) defaultTimestampGenerator() → {TimestampGenerator}

Returns a new instance of the default timestamp generator used by the driver.

Source:
Returns:
Type
TimestampGenerator