Inherits

Extends

  • Forwardable

Methods

self.

new

(wrapped_policy, shuffle = true)

Returns a new instance of TokenAware

Note
If replicas are not shuffled (shuffle = false), then it is possibile to create hotspots in a write-heavy scenario, where most of the write requests will be handled by the same node(s). The default behavior of shuffling replicas helps mitigate this by universally distributing write load between replicas. However, it under-utilizes read caching and forces multiple replicas to cache the same read statements.
Parameters:
Name Type Details
wrapped_policy LoadBalancing::Policy actual policy to filter
shuffle Boolean (defaults to: true) (true) whether or not to shuffle the replicas

distance

(host)

Delegates to wrapped policy

See Also:

host_found

(host)

Delegates to wrapped policy

See Also:

host_up

(host)

Delegates to wrapped policy

See Also:

host_down

(host)

Delegates to wrapped policy

See Also:

host_lost

(host)

Delegates to wrapped policy

See Also:

setup

(cluster)
Specifications:
TokenAware#setup sets up wrapped policy
expect(policy).to receive(:setup).once.with(cluster)
subject.setup(cluster)

teardown

(cluster)

plan

(keyspace, statement, options)