clojurewerkz.cassaforte.policies

Consistency levels, retry policies, reconnection policies, etc

*consistency-level*

dynamic

*retry-policy*

dynamic

consistency-level

(consistency-level cl)

consistency-levels

constant-reconnection-policy

(constant-reconnection-policy delay-ms)
Reconnection policy that waits constantly longer between each
reconnection attempt but keeps a constant delay once a maximum delay is
reached.

   Delay should be given in milliseconds

dc-aware-round-robin-policy

(dc-aware-round-robin-policy local-dc)
Datacenter aware load balancing policy.

Like round-robin but over the nodes located in the same datacenter.
Nodes from other datacenters will be tried only if all requests to local nodes fail.

exponential-reconnection-policy

(exponential-reconnection-policy base-delay-ms max-delay-ms)
Reconnection policy that waits exponentially longer between each
reconnection attempt but keeps a constant delay once a maximum delay is reached.

   Delays should be given in milliseconds

forcing-prepared-statements

macro

(forcing-prepared-statements & body)
Forces prepared statements for operations executed in the body

logging-retry-policy

(logging-retry-policy policy)
A retry policy that wraps another policy, logging the decision made by its sub-policy.

resolve-consistency-level

(resolve-consistency-level cl)

retry-policies

retry-policy

(retry-policy rp)

round-robin-policy

(round-robin-policy)
Round-robin load balancing policy. Picks nodes to execute requests on in order.

token-aware-policy

(token-aware-policy underlying-policy)
Takes a load balancing policy and makes it token-aware

with-consistency-level

macro

(with-consistency-level consistency-level & body)
Executes a query with the given consistency level

with-retry-policy

macro

(with-retry-policy retry-policy & body)
Executes a query with the given retry policy

without-prepared-statements

macro

(without-prepared-statements & body)
Disables prepared statements for operations executed in the body